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-8321] 4.2 regression with inout-to-pointer case expressions #50849

Closed
hamishknight opened this issue Jul 19, 2018 · 1 comment
Closed

[SR-8321] 4.2 regression with inout-to-pointer case expressions #50849

hamishknight opened this issue Jul 19, 2018 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.2 type checker Area → compiler: Semantic analysis

Comments

@hamishknight
Copy link
Collaborator

Previous ID SR-8321
Radar None
Original Reporter @hamishknight
Type Bug
Status Closed
Resolution Invalid
Environment

Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)
Target: x86_64-apple-darwin17.6.0

Apple Swift version 4.2-dev (LLVM da1c9a3ae4, Clang a0e59b03e6, Swift e325e32)
Target: x86_64-apple-darwin17.6.0

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

md5: 2fec481b892614e8c266431c0c02b81a

Issue Description:

The following compiles in Swift 4.1 and on master, but doesn't compile in the latest 4.2 snapshot:

var x = 0
func foo(_ ptr: UnsafeMutableRawPointer) {
  switch ptr {
  case &x: // error in 4.2: Use of extraneous '&'
    break
  default:
    break
  }
}
@hamishknight
Copy link
Collaborator Author

Huh, weird it's now working in the latest 4.2 snaphot.... never mind then!

@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 regression swift 4.2 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants