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
Apple Swift version 4.0 (swiftlang-900.0.65 clang-900.0.37)
Target: x86_64-apple-macosx10.9 on 10.12.6 (16G29).
Additional Detail from JIRA
Votes
0
Component/s
Labels
Bug
Assignee
None
Priority
Medium
md5: fc4038930e44975af4362d54e9b99268
duplicates:
SR-4387 Compiler Segmentation Fault 11 on wrongly ordered lets
Issue Description:
With the following code sample, the Swift compiler will seg fault.
The intention of the sample is poorly reasoned; occluding a instance field with a locally unwrapped optional of a different type, I suspect, is not "good practice". That said, I suspect/ expect that the compiler should allow it to be defined as that new type in scope - to disambiguate the two by dereferencing `self` for the instance field.
classFoo {
vara: String? = nilfuncmakeBar() -> Bar? {
guardletaString = a,
leta = Int(aString) else { returnnil }
returnBar(b: a)
}
}
classBar {
letb: Intinit(b: Int) {
self.b = b
}
}
{{ }}
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
Apple Swift version 4.0 (swiftlang-900.0.65 clang-900.0.37)
Target: x86_64-apple-macosx10.9 on 10.12.6 (16G29).
Additional Detail from JIRA
md5: fc4038930e44975af4362d54e9b99268
duplicates:
let
sIssue Description:
With the following code sample, the Swift compiler will seg fault.
The intention of the sample is poorly reasoned; occluding a instance field with a locally unwrapped optional of a different type, I suspect, is not "good practice". That said, I suspect/ expect that the compiler should allow it to be defined as that new type in scope - to disambiguate the two by dereferencing `self` for the instance field.
{{ }}
The text was updated successfully, but these errors were encountered: