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-14869] Typechecker Fails Assertion When Assigning Escaping Closure Taking Wrong Inout Type #57216

Closed
swift-ci opened this issue Jul 2, 2021 · 3 comments
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 Jul 2, 2021

Previous ID SR-14869
Radar None
Original Reporter mdmorris (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Compiler Explorer Linux Swift 5.4, Ubuntu 16.04

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

md5: 596268fb22d858ca3043286142edfa81

Issue Description:

This should cause a type mismatch error, but instead it crashes the typechecker:

do {
    var action: (inout Float) -> ()
    // KABOOM!
    action = { (_: inout Int) in }
}

Compiler Explorer

@LucianoPAlmeida
Copy link
Collaborator

Here is a PR #38250

@LucianoPAlmeida
Copy link
Collaborator

Fix is on main, mdmorris (JIRA User) can you please verify on the next available main snapshot and close? Thanks

@swift-ci
Copy link
Collaborator Author

Comment by Michael D. Morris (JIRA)

This works correctly on nightly.

@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