We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
md5: 280c314c465f76f2372391a2e435806d
duplicates:
relates to:
Issue Description:
The problem is illustrated at http://stackoverflow.com/questions/39983561/swift-3-silently-allows-shadowing-a-parameter
This really, really leads to hard-to-spot bugs. Please reconsider, and add an appropriate warning to the compiler.
Sample code:
func f(_ x: inout Int?) { var x: Int? // <– this declaration should produce a warning x = 105 if x! < 1000 {} }
var a: Int? = 3 f(&a) print("(a)")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Additional Detail from JIRA
md5: 280c314c465f76f2372391a2e435806d
duplicates:
relates to:
Issue Description:
The problem is illustrated at http://stackoverflow.com/questions/39983561/swift-3-silently-allows-shadowing-a-parameter
This really, really leads to hard-to-spot bugs. Please reconsider, and add an appropriate warning to the compiler.
Sample code:
func f(_ x: inout Int?) {
var x: Int? // <– this declaration should produce a warning
x = 105
if x! < 1000 {}
}
var a: Int? = 3
f(&a)
print("(a)")
The text was updated successfully, but these errors were encountered: