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.
1 parent 782f57e commit 37646f6Copy full SHA for 37646f6
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -2724,6 +2724,7 @@ class Typer extends Namer
2724
case tree: untpd.Quote => typedQuote(tree, pt)
2725
case tree: untpd.Splice => typedSplice(tree, pt)
2726
case tree: untpd.TypSplice => typedTypSplice(tree, pt)
2727
+ case tree: untpd.MacroTree => report.error("Unexpected macro", tree.srcPos); tpd.nullLiteral // ill-formed code may reach here
2728
case _ => typedUnadapted(desugar(tree), pt, locked)
2729
}
2730
tests/neg/i12361.scala
@@ -0,0 +1,3 @@
1
+object Test {
2
+ foo = macro Impls . foo [ U ] += // error // error
3
+}
0 commit comments