Skip to content

Commit 31da834

Browse files
committed
Use Feature.ccEnabledSomewhere instead of needsCaptureChecking
1 parent a2ec372 commit 31da834

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
242242
val refsText = if showAsCap then rootSetText else toTextCaptureSet(refs)
243243
toTextCapturing(parent, refsText, boxText)
244244
case tp @ RetainingType(parent, refs) =>
245-
if ctx.compilationUnit.needsCaptureChecking then
245+
if Feature.ccEnabledSomewhere then
246246
val refsText = refs match
247247
case ref :: Nil if ref.symbol == defn.captureRoot => rootSetText
248248
case _ => toTextRetainedElems(refs)

0 commit comments

Comments
 (0)