Skip to content

Commit

Permalink
Make printing of capture sets work also when testing Pickler
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Oct 29, 2023
1 parent 78c2220 commit 041f9ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 3 additions & 1 deletion compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
try changePrec(GlobalPrec)(toText(arg) ~ "^" ~ toTextCaptureSet(captureSet))
catch case ex: IllegalCaptureRef => toTextAnnot
if annot.symbol.maybeOwner == defn.RetainsAnnot
&& Feature.ccEnabled && Config.printCaptureSetsAsPrefix && !printDebug
&& Feature.ccEnabled
&& Config.printCaptureSetsAsPrefix && !printDebug
&& Phases.checkCapturesPhase.exists // might be missing on -Ytest-pickler
then toTextRetainsAnnot
else toTextAnnot
case EmptyTree =>
Expand Down
7 changes: 0 additions & 7 deletions tests/pos-custom-args/captures/i18699.scala

This file was deleted.

0 comments on commit 041f9ce

Please sign in to comment.