You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/typer/Typer.scala
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2809,8 +2809,10 @@ class Typer extends Namer
2809
2809
}
2810
2810
elseif (tree.symbol.isScala2Macro) {
2811
2811
if (ctx.settings.XignoreScala2Macros.value) {
2812
-
ctx.warning("Scala 2 macro cannot be used in Dotty, this call will crash at runtime. See http://dotty.epfl.ch/docs/reference/dropped-features/macros.html", tree.sourcePos)
2813
-
Throw(New(defn.MatchErrorType, Literal(Constant(s"Reached unexpanded Scala 2 macro call to ${tree.symbol.showFullName} compiled with -Xignore-scala2-macros.")) ::Nil)).withSpan(tree.span)
2812
+
ctx.warning("Scala 2 macro cannot be used in Dotty, this call will crash at runtime. See http://dotty.epfl.ch/docs/reference/dropped-features/macros.html", tree.sourcePos.startPos)
2813
+
Throw(New(defn.MatchErrorType, Literal(Constant(s"Reached unexpanded Scala 2 macro call to ${tree.symbol.showFullName} compiled with -Xignore-scala2-macros.")) ::Nil))
2814
+
.withType(tree.tpe)
2815
+
.withSpan(tree.span)
2814
2816
} elseif (tree.symbol eq defn.StringContext_f) {
2815
2817
// As scala.StringContext.f is defined in the standard library which
2816
2818
// we currently do not bootstrap we cannot implement the macro the library.
0 commit comments