Skip to content
New issue

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

[SR-5148] Indirect enum creates wrong case if associated type is an enum with a single case #47724

Closed
swift-ci opened this issue Jun 7, 2017 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 7, 2017

Previous ID SR-5148
Radar rdar://problem/32618580
Original Reporter Thomvis (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 8.3.2 (Swift 3) and Xcode 9 beta 1 (Swift 4)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Miscompile
Assignee @aschwaighofer
Priority Medium

md5: fcbe8318a260b5fc1e09e2269f6c4a3a

relates to:

  • SR-5210 Indirect enum creates wrong case if one of cases has associated type with zero sized memory layout

Issue Description:

Please consider the following code:

enum Payload {
    case email
}

indirect enum Test {
    case a
    case b(Payload)
}

Test.b(.email) // creates .a

`Test.b(.email)` actually creates a `Test.a`. If a second case is added to the `Payload` enum, this issue no longer occurs.

@belkadan
Copy link
Contributor

belkadan commented Jun 7, 2017

@swift-ci create

@aschwaighofer
Copy link
Member

Fixed in #10326

@ematejska
Copy link
Mannequin

ematejska mannequin commented Aug 24, 2017

Moving to Resolved, seems to be working.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

3 participants