You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macdrevx opened this issue
Aug 6, 2018
· 5 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Wouldn't that be behaving correctly not to error? Before the local `bar` is declared, `bar` refers to the outer scope's `bar`. Maybe worth warning about at least, but this seems valid.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
$ swiftc --version
Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Xcode Version 9.4.1 (9F2000)
Additional Detail from JIRA
md5: ce03de672a4ef4fa279c9c44183686f9
Issue Description:
Steps to reproduce:
1. Compile the following:
Expected result:
Something along the lines of: "error: use of local variable 'bar' before its declaration"
Actual result:
The compiler crashes:
Discussion:
This code is invalid because the first line of navigate(with:) refers to bar instead of self.bar
The text was updated successfully, but these errors were encountered: