-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwarerun-time crashBug → crash: Swift code crashed during executionBug → crash: Swift code crashed during execution
Description
| Previous ID | SR-1146 |
| Radar | None |
| Original Reporter | flobraunschweig (JIRA User) |
| Type | Bug |
| Status | Reopened |
| Resolution |
Attachment: Download
Environment
Xcode 7.3, Swift 2.2
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, RunTimeCrash |
| Assignee | None |
| Priority | Medium |
md5: b8a7dc0da5ceb86328da85d2daa4165f
Issue Description:
When using the following notation, the application crashes at runtime with a bad access exception:
App Delegate:
let a = EnumCrashTest() // Runtime crash with bad access exception here!A Class Definition:
enum SingleCaseEnum {
case FirstCase
}
class EnumCrashTest {
var singleCaseEnum: SingleCaseEnum
init() {
singleCaseEnum = .FirstCase
}
}The bug does not occur when using a struct instead of a class or if more than one cases are defined in the enumeration.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwarerun-time crashBug → crash: Swift code crashed during executionBug → crash: Swift code crashed during execution