Skip to content

Commit 4cda53f

Browse files
committed
Refactor code
1 parent 5069182 commit 4cda53f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
266266
("{" ~ toText(trees, "\n") ~ "}").close
267267

268268
protected def typeApplyText[T >: Untyped](tree: TypeApply[T]): Text = {
269-
val isQuote = !printDebug && tree.fun.hasType && tree.fun.symbol == defn.QuotedTypeModule_apply
270269
val funText = toTextLocal(tree.fun)
271270
tree.fun match {
272271
case Select(New(tpt), nme.CONSTRUCTOR) if tpt.typeOpt.dealias.isInstanceOf[AppliedType] =>

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
176176
case tp: TypeRef =>
177177
tp.prefix match
178178
case NoPrefix if level > levelOf(tp.symbol) && !tp.typeSymbol.hasAnnotation(defn.InternalQuoted_QuoteTypeTagAnnot) =>
179-
val tp1 = tp.dealias
180-
if tp1 != tp then apply(tp1)
181-
else tryHeal(tp.symbol, tp, pos)
179+
tp.dealias match
180+
case `tp` => tryHeal(tp.symbol, tp, pos)
181+
case tp1 => apply(tp1)
182182
case prefix: ThisType if !tp.symbol.isStatic && level > levelOf(prefix.cls) =>
183183
tryHeal(tp.symbol, tp, pos)
184184
case prefix: TermRef if tp.symbol.isTypeSplice =>

0 commit comments

Comments
 (0)