[SR-13404] Swift 5 Compiler Fails to Distinguish Variable from Function #55845
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Xcode 12.0 beta 4 (12A8179i)
macOS Catalina 10.15.6
Additional Detail from JIRA
md5: a3858008ce047d7795f759316684c5f2
duplicates:
Issue Description:
Consider this code snippet:
Using a playground in Xcode 12.0 beta 4 (12A8179i), the above code snippet produces the error: "Variable used within its own initial value". But that's not right. On the left side, "row" is indeed a variable. But on the right side, "row(at🙂" is a method of NSOutlineView.
This line of code should be perfectly legal, should it not? It seems that the compiler is misidentifying the second instance of "row" in the line.
The text was updated successfully, but these errors were encountered: