Skip to content

[3.0] Fix casting to Measurement and introduce custom AnyHashable support #4801

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

Conversation

DougGregor
Copy link
Member

This PR fixes a crash-on-valid in the compiler where we had an 'unreachable' assertion on valid code that attempts to perform a bridging cast from NSMeasurement to Measurement. While that fix is good in an of itself, it also unblocked custom AnyHashable support for NSMeasurement.

Resolves rdar://problem/27539951.

The type checker had some logic for performing specific checking for
explicit bridging casts of generic types based on knowledge of
Array/Dictionary/Set, but pretended no other bridged generic types
existed. That's incorrect now; simply require them to match exactly.

Fixes rdar://problem/27539951.

(cherry picked from commit 6b91c5b)
…easurement

Enables the overlay behavior blocked by rdar://problem/27539951.

(cherry picked from commit fa4331b)
@DougGregor DougGregor added this to the Swift 3.0 milestone Sep 15, 2016
@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@tkremenek tkremenek merged commit a2e3e7c into swiftlang:swift-3.0-branch Sep 15, 2016
@DougGregor DougGregor deleted the measurement-custom-anyhashable-3-0 branch September 15, 2016 21:30
aaditya-chandrasekhar pushed a commit to val-verde/swift that referenced this pull request Sep 30, 2022
[pull] swiftwasm-release/5.7 from release/5.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants