Skip to content

Commit ea19290

Browse files
committed
No need to unbox if expected type is LhsProto
1 parent 5e83606 commit ea19290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ class CheckCaptures extends Recheck, SymTransformer:
969969
if tree.isTerm then
970970
if !ccConfig.useExistentials then
971971
checkReachCapsIsolated(res.widen, tree.srcPos)
972-
if !pt.isBoxedCapturing then
972+
if !pt.isBoxedCapturing && pt != LhsProto then
973973
markFree(res.boxedCaptureSet, tree.srcPos)
974974
res
975975

0 commit comments

Comments
 (0)