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 6, 2019
· 2 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfruntimeThe Swift Runtime
Given WrappingStruct which contains two properties, an SingleValueEnum and a Date. This causes an EXC_BREAKPOINT crash when run in the debugger.
This crash seems to be closely tied to the types used and the exact structure created. It can be resolved via any of the below
a.) Adding a second case to the enum
b.) Changing the associated value from TimeZone to String
c.) Adding a third property to the struct
d.) Removing the enum property from the struct
Quinn helped me to boil my example down in the forum post to an even smaller test case.
```
import Foundation
enum SingleValueEnum {
case timezone(TimeZone)
}
struct WrappingStruct_Fails {
let enumValue: SingleValueEnum
let date: Date
}
func main() {
let fails = [WrappingStruct_Fails]()
print("fails: (fails)")
}
main()
```
The text was updated successfully, but these errors were encountered:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfruntimeThe Swift Runtime
Additional Detail from JIRA
md5: 32f47a204e031efe8dfbcd863ced6622
duplicates:
Issue Description:
This originated from a discussion on the forums: https://forums.swift.org/t/exc-breakpoint-when-creating-array-with-specific-types/24060
Given WrappingStruct which contains two properties, an SingleValueEnum and a Date. This causes an EXC_BREAKPOINT crash when run in the debugger.
This crash seems to be closely tied to the types used and the exact structure created. It can be resolved via any of the below
a.) Adding a second case to the enum
b.) Changing the associated value from TimeZone to String
c.) Adding a third property to the struct
d.) Removing the enum property from the struct
Quinn helped me to boil my example down in the forum post to an even smaller test case.
```
import Foundation
enum SingleValueEnum {
case timezone(TimeZone)
}
struct WrappingStruct_Fails {
let enumValue: SingleValueEnum
let date: Date
}
func main() {
let fails = [WrappingStruct_Fails]()
print("fails: (fails)")
}
main()
```
The text was updated successfully, but these errors were encountered: