[SR-10668] Lazy variables referencing each other in closures no longer compiles with Swift 5 #53067
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.0
Environment
Swift 5
Xcode 10.2.1
macOS 10.14.4
Additional Detail from JIRA
md5: 53b86198e420bf1e3f5944efa4cfaeea
Issue Description:
When upgrading from Swift 4.2 to Swift 5, I encountered a case of code that no longer compiles.
The following compiled fine in Swift 4.2 (Xcode 10.1):
But with Swift 5 (Xcode 10.2), I get this error:
However, if I remove the `run()` usage from the `a` variable, it compiles fine:
I couldn't find anything in the release notes about this, so I'm gonna assume it's a regression in Swift 5.
I use the `run()` utility a lot in my code and it would be too bad if that pattern is no longer supported.
The text was updated successfully, but these errors were encountered: