Skip to content

Commit 67c30ce

Browse files
committed
Remove optimization that is also done later in ReifyQuotes
1 parent da1fbd1 commit 67c30ce

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,7 @@ class Staging extends MacroTransformWithImplicits {
301301
*/
302302
private def quotation(body: Tree, quote: Tree)(implicit ctx: Context): Tree = {
303303
val isType = quote.symbol eq defn.QuotedType_apply
304-
if (body.symbol.isSplice) {
305-
// simplify `'(~x)` to `x` and then transform it
306-
val Select(splice, _) = body
307-
transform(splice)
308-
}
309-
else if (level > 0) {
304+
if (level > 0) {
310305
val body1 = nested(isQuote = true).transform(body)
311306
// Keep quotes as trees to reduce pickled size and have a Expr.show without pickled quotes
312307
if (isType) ref(defn.QuotedType_apply).appliedToType(body1.tpe.widen)

0 commit comments

Comments
 (0)