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 49215aa + 0a1ceb9 commit 09a73dcCopy full SHA for 09a73dc
compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala
@@ -250,7 +250,7 @@ trait QuotesAndSplices {
250
val pat1 = if (patType eq patType1) pat else pat.withType(patType1)
251
patBuf += pat1
252
}
253
- case Select(pat, _) if tree.symbol.isTypeSplice =>
+ case Select(pat: Bind, _) if tree.symbol.isTypeSplice =>
254
val sym = tree.tpe.dealias.typeSymbol
255
if sym.exists then
256
val tdef = TypeDef(sym.asType).withSpan(sym.span)
tests/pos-macros/i17039.scala
@@ -0,0 +1,7 @@
1
+import scala.quoted.*
2
+
3
+def macroImpl(using Quotes) =
4
+ val t = summon[Type[Int]]
5
+ Type.of[Int] match
6
+ case '[t.Underlying] => '{true}
7
+ case _ => '{false}
0 commit comments