File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -222,30 +222,13 @@ class ReifyQuotes extends MacroTransformWithImplicits {
222
222
val hole = makeHole(body1, quotes, tpe).withPos(splice.pos)
223
223
// We do not place add the inline marker for trees that where lifted as they come from the same file as their
224
224
// enclosing quote. Any intemediate splice will add it's own Inlined node and cancel it before splicig the lifted tree.
225
- // Note that lifted trees are not necessarily expressions and that Inlined nodes are expected to be expressions.
225
+ // Note that lifted trees are not necessarily expressions and that Inlined nodes are expected to be expressions.
226
226
// For example we can have a lifted tree containing the LHS of an assignment (see tests/run-with-compiler/quote-var.scala).
227
227
if (splice.isType || outer.embedded.isLiftedSymbol(splice.qualifier.symbol)) hole
228
228
else Inlined (EmptyTree , Nil , hole)
229
229
}
230
- else if (enclosingInlineds.nonEmpty) { // level 0 in an inlined call
231
- assert(false )
232
- splice
233
- }
234
- else if (! ctx.owner.isInlineMethod) { // level 0 outside an inline method
235
- // if (splice.isTerm)
236
- // ctx.error(i"splice outside quotes or inline method", splice.pos)
237
- // some spliced types might be left as infered aliases to their underlying type
238
- splice
239
-
240
- }
241
- else if (Splicer .canBeSpliced(splice.qualifier)) { // level 0 inside an inline definition
242
- assert(false )
243
- // nested(isQuote = false).split(splice.qualifier) // Just check PCP
244
- splice
245
- }
246
- else { // level 0 inside an inline definition
247
- assert(false )
248
- // ctx.error("Malformed macro call. The contents of the ~ must call a static method and arguments must be quoted or inline.".stripMargin, splice.pos)
230
+ else {
231
+ assert(level == 0 )
249
232
splice
250
233
}
251
234
}
You can’t perform that action at this time.
0 commit comments