Skip to content

Commit 4e23370

Browse files
Updated code comment to avoid giving false promises about adoption strategy of the feature
1 parent 86100fe commit 4e23370

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/Sema/MiscDiagnostics.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,11 +1792,10 @@ class ImplicitSelfUsageChecker : public BaseDiagnosticWalker {
17921792
//
17931793
// In 5.10, instead of this check, compiler was checking that RHS of the
17941794
// self binding is loaded from a mutable variable. This is incorrect, but
1795-
// before SE-0481 compiler was trying to maintain this behavior in Swift 5
1796-
// mode for source compatibility. After SE-0481 this does not work
1797-
// anymore, because even in Swift 5 mode `weak self` capture is not mutable.
1798-
// So we have to introduce a breaking change as part of the SE-0481, and use
1799-
// proper check for capture list even in Swift 5 mode.
1795+
// before immutable weak captures compiler was trying to maintain this
1796+
// behavior in Swift 5 mode for source compatibility. With immutable weak
1797+
// captures this does not work anymore, because even in Swift 5 mode there
1798+
// is no `LoadExpr` to use.
18001799
//
18011800
return conditionalStmt->rebindsSelf(Ctx, /*requiresCaptureListRef*/ true);
18021801
} else {

0 commit comments

Comments
 (0)