From f8f3057da85ddf1530f0377530b6fd5f65e65fb6 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Tue, 18 May 2021 16:21:28 +0200 Subject: [PATCH] Add regression test Closes #11162 --- tests/run-staging/i11162.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/run-staging/i11162.scala 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") } +}