File tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/printing
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
318
318
if (name.isTypeName) typeText(txt)
319
319
else txt
320
320
case tree @ Select (qual, name) =>
321
- if (tree.symbol == defn.QuotedExpr_~ || tree.symbol == defn.QuotedType_~ ) keywordStr(" ~(" ) ~ toTextLocal(qual) ~ keywordStr(" )" )
321
+ if (tree.hasType && tree. symbol == defn.QuotedExpr_~ || tree.symbol == defn.QuotedType_~ ) keywordStr(" ~(" ) ~ toTextLocal(qual) ~ keywordStr(" )" )
322
322
else if (qual.isType) toTextLocal(qual) ~ " #" ~ typeText(toText(name))
323
323
else toTextLocal(qual) ~ (" ." ~ nameIdText(tree) provided name != nme.CONSTRUCTOR )
324
324
case tree : This =>
@@ -330,9 +330,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
330
330
changePrec (GlobalPrec ) {
331
331
keywordStr(" throw " ) ~ toText(args.head)
332
332
}
333
- else if (fun.symbol == defn.QuotedExpr_apply )
333
+ else if (fun.hasType && fun. symbol == defn.QuotedExpr_apply )
334
334
keywordStr(" '{" ) ~ toTextGlobal(args, " , " ) ~ keywordStr(" }" )
335
- else if (fun.symbol == defn.QuotedType_apply )
335
+ else if (fun.hasType && fun. symbol == defn.QuotedType_apply )
336
336
keywordStr(" '[" ) ~ toTextGlobal(args, " , " ) ~ keywordStr(" ]" )
337
337
else
338
338
toTextLocal(fun) ~ " (" ~ toTextGlobal(args, " , " ) ~ " )"
You can’t perform that action at this time.
0 commit comments