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
THis is possible now that we have access to information
about the outer inlined tree nodes via enclosingInlineds.
In particular we can recover the position where the macro was inlined.
if (ctx.reporter.hasErrors) splice else transform(evaluatedSplice)
426
+
}
427
+
elseif (!ctx.owner.is(Transparent)) { // level 0 outside a transparent definition
428
+
ctx.error(i"splice outside quotes or transparent method", splice.pos)
429
+
splice
430
+
}
431
+
elseif (Splicer.canBeSpliced(splice.qualifier)) { // level 0 inside a transparent definition
432
+
nested(isQuote =false).split(splice.qualifier) // Just check PCP
433
+
splice
434
+
}
435
+
else { // level 0 inside a transparent definition
436
+
ctx.error("Malformed macro call. The contents of the ~ must call a static method and arguments must be quoted or transparent.".stripMargin, splice.pos)
437
+
splice
438
+
}
429
439
}
430
440
431
441
/** Transforms the contents of a nested splice
@@ -550,18 +560,6 @@ class ReifyQuotes extends MacroTransformWithImplicits {
0 commit comments