From 4baffce739f7f6674a58539a435575636b25b549 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Tue, 2 May 2023 10:23:11 +0200 Subject: [PATCH] Add regression test Closes #9360 --- tests/pos-macros/i9360.scala | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/pos-macros/i9360.scala diff --git a/tests/pos-macros/i9360.scala b/tests/pos-macros/i9360.scala new file mode 100644 index 000000000000..699ef5f38bee --- /dev/null +++ b/tests/pos-macros/i9360.scala @@ -0,0 +1,22 @@ +package a + +import scala.quoted._ + +trait CPM[F[_]] + +def fun[M[_],T](t:T)(using m:CPM[M]):M[T] = ??? + +object M { + + inline def transform[F[_],T](t:T): F[T] = + ${ transformImpl[F,T]('t) } + + def transformImpl[F[_]:Type,T:Type](t:Expr[T])(using Quotes):Expr[F[T]] = { + import quotes.reflect._ + t match { + case '{ type mt[_]; a.fun[`mt`, tt]($t)(using $m) } => ??? + } + + } + +}