diff --git a/tests/run-staging/i11162.scala b/tests/run-staging/i11162.scala new file mode 100644 index 000000000000..81db85f24274 --- /dev/null +++ b/tests/run-staging/i11162.scala @@ -0,0 +1,15 @@ +import scala.quoted.* + +object Test { + + given staging.Compiler = staging.Compiler.make(getClass.getClassLoader) + + def main(args: Array[String]): Unit = + staging.run { + '{ foo() } + } + + inline def foo(): Unit = ${ fooExpr() } + + private def fooExpr()(using Quotes): Expr[Unit] = '{ println("foo") } +}