We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a58cc4 + d3f50c2 commit 8a6e24fCopy full SHA for 8a6e24f
tests/neg-macros/i8865.scala
@@ -0,0 +1,10 @@
1
+import scala.quoted._
2
+object Macro {
3
+
4
+ def impl[A : Type](using Quotes): Expr[A] = {
5
+ import quotes.reflect._
6
+ val tpe = TypeRepr.of[A].asType
7
+ '{ (a: ${tpe}) => ???} // error: tpe.Underlying cannot be used as a value type
8
+ '{???}
9
+ }
10
+}
tests/pos-macros/i8865.scala
+ TypeRepr.of[A].asType match
+ case '[tpe] => '{ (a: tpe) => ???}
0 commit comments