From 235ca43c3ad24c79dc62920fd70a337cc9f33e6e Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 17 Mar 2021 13:48:23 +0100 Subject: [PATCH] Add regression test --- tests/pos-macros/i11782.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/pos-macros/i11782.scala diff --git a/tests/pos-macros/i11782.scala b/tests/pos-macros/i11782.scala new file mode 100644 index 000000000000..d4a6c0a63ba2 --- /dev/null +++ b/tests/pos-macros/i11782.scala @@ -0,0 +1,12 @@ +import scala.quoted._ + +trait X[A] { def x(a: A): Boolean } + +def hmm[A](using Quotes, Type[A]): Expr[Unit] = { + def sadFace(f: (Expr[A]) => Expr[Boolean]): Expr[X[A]] = '{ + new X[A] { + override def x(a: A) = ${f('a)} + } + } + '{()} +} \ No newline at end of file