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-15925] Overloaded enum cases break the compiler #58186

Closed
NachoSoto opened this issue Mar 1, 2022 · 1 comment
Closed

[SR-15925] Overloaded enum cases break the compiler #58186

NachoSoto opened this issue Mar 1, 2022 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@NachoSoto
Copy link
Contributor

Previous ID SR-15925
Radar rdar://problem/89641528
Original Reporter @NachoSoto
Type Bug
Status Closed
Resolution Duplicate
Environment

swift-driver version: 1.26.21
Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: arm64-apple-macosx12.0

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 63a0a514da4ac0a5e194df4742852081

blocks:

  • SR-11159 Typechecker crash on overloaded enum case

Issue Description:

Consider this enum:

enum E {
  case a(a: Int)
  case a(b: String)
}

It's impossible to `switch` for It. Additionally, the CLI breaks too:

  6> E.a(a: 1)
$R0: E = a {
  a = {
    a = 1
  }
}
  7> E.a(b: "test")
$R1: E = a {
  a = {
    a = 1953719668
  }
}
@slavapestov
Copy link
Member

@swift-ci create

@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

2 participants