Skip to content

Commit 1a44aa6

Browse files
committed
Cleanup
1 parent d70cd33 commit 1a44aa6

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -222,30 +222,13 @@ class ReifyQuotes extends MacroTransformWithImplicits {
222222
val hole = makeHole(body1, quotes, tpe).withPos(splice.pos)
223223
// We do not place add the inline marker for trees that where lifted as they come from the same file as their
224224
// 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.
226226
// For example we can have a lifted tree containing the LHS of an assignment (see tests/run-with-compiler/quote-var.scala).
227227
if (splice.isType || outer.embedded.isLiftedSymbol(splice.qualifier.symbol)) hole
228228
else Inlined(EmptyTree, Nil, hole)
229229
}
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)
249232
splice
250233
}
251234
}

0 commit comments

Comments
 (0)