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
swift-ci opened this issue
May 26, 2021
· 3 comments
· Fixed by #59171
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
Swift 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, CompilerCrash
Assignee
None
Priority
Medium
md5: 511faf1769264cce28ba907b89fbd44b
Issue Description:
I'm trying to extend Swift's Optional type to add constructors that take Optionals associated with other types so I don't have to guard multiple times when converting between primitive types. I simply expect the whole statement to cascade to nil if it encounters nil anywhere or the constructor fails.
Anyway, I wrote the following code (included in the reproducible):
Assertionfailed: (resultTy.getASTType().getOptionalObjectType() && "input was not a nested optional value"), functionflattenOptional, fileSILGenExpr.cpp, line3928.
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
Attachment: Download
Environment
macOS 11.4 (20F71)
Xcode 12.5 (12E262)
Swift 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
Additional Detail from JIRA
md5: 511faf1769264cce28ba907b89fbd44b
Issue Description:
I'm trying to extend Swift's Optional type to add constructors that take Optionals associated with other types so I don't have to guard multiple times when converting between primitive types. I simply expect the whole statement to cascade to nil if it encounters nil anywhere or the constructor fails.
Anyway, I wrote the following code (included in the reproducible):
Whatever project I put this file into, it crashes Swift compiler with Segmentation fault: 11; and Xcode stops helping me work due to internal error.
I put it in a blank iOS project and uploaded a reproducible.
P.S.: I'm not 100% sure the code above should compile since I've got no way to know now.
The text was updated successfully, but these errors were encountered: