swift
fe272e6c - [Sema] Restore 5.10 implicit self behavior prior to Swift 6 mode

Commit
2 years ago
[Sema] Restore 5.10 implicit self behavior prior to Swift 6 mode Unfortunately we've encountered another source breaking case here: ``` class C { func method() {} func foo() { Task { [weak self] in Task { method() } } } } ``` In 5.10 we'd only do the unqualified lookup for `self` when directly in a `weak self` closure, but with the implicit self rework, we'd start using the `weak self` here, leading to a type-checker error. At this point, adding more edge cases to the existing logic is going to make things much more complicated. Instead, reinstate the 5.10 implicit self lookup behavior and diagnostic logic, switching over to the new logic only under Swift 6 mode. rdar://129475277
Author
Parents
Loading