Skip to content

Commit 65900c0

Browse files
Add regression test (#17390)
Closes #9360
2 parents dee0065 + 4baffce commit 65900c0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/pos-macros/i9360.scala

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package a
2+
3+
import scala.quoted._
4+
5+
trait CPM[F[_]]
6+
7+
def fun[M[_],T](t:T)(using m:CPM[M]):M[T] = ???
8+
9+
object M {
10+
11+
inline def transform[F[_],T](t:T): F[T] =
12+
${ transformImpl[F,T]('t) }
13+
14+
def transformImpl[F[_]:Type,T:Type](t:Expr[T])(using Quotes):Expr[F[T]] = {
15+
import quotes.reflect._
16+
t match {
17+
case '{ type mt[_]; a.fun[`mt`, tt]($t)(using $m) } => ???
18+
}
19+
20+
}
21+
22+
}

0 commit comments

Comments
 (0)