Skip to content

Commit 7c642c2

Browse files
committed
Add StringOps and StringBuilder to stdlib tests
1 parent 5543104 commit 7c642c2

File tree

6 files changed

+2160
-11
lines changed

6 files changed

+2160
-11
lines changed

compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,9 @@ class CheckCaptures extends Recheck, SymTransformer:
398398
if meth == defn.Caps_unsafeAssumePure then
399399
val arg :: Nil = tree.args: @unchecked
400400
val argType0 = recheck(arg, pt.capturing(CaptureSet.universal))
401-
val argType = if argType0.captureSet.isAlwaysEmpty then argType0
402-
else argType0.widen.stripCapturing
401+
val argType =
402+
if argType0.captureSet.isAlwaysEmpty then argType0
403+
else argType0.widen.stripCapturing
403404
capt.println(i"rechecking $arg with ${pt.capturing(CaptureSet.universal)}: $argType")
404405
super.recheckFinish(argType, tree, pt)
405406
else if meth == defn.Caps_unsafeBox then

tests/pos/stdlib/StringOps.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
collection/StringOps.scala

0 commit comments

Comments
 (0)