Skip to content

Verify that nil can cast to AnyHashable #34434

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

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Oct 26, 2020

This is another case that was broken in Swift 5.3 and earlier but was
fixed by the new dynamic cast runtime.

Add a test to help ensure it stays fixed.

Optional conditionally conforms to Hashable, so for
example `Optional<Int>` must cast to AnyHashable
_even if it contains `nil`_.  This was broken up
through Swift 5.3 and was fixed by the new dynamic
cast runtime.

Add a test to ensure this stays fixed.
@tbkka
Copy link
Contributor Author

tbkka commented Oct 26, 2020

@swift-ci Please test

@tbkka tbkka requested a review from mikeash October 26, 2020 16:55
Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good move.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bf8642b

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - bf8642b

@tbkka
Copy link
Contributor Author

tbkka commented Oct 26, 2020

@swift-ci Please test Windows platform

@tbkka
Copy link
Contributor Author

tbkka commented Oct 26, 2020

@swift-ci Please test

1 similar comment
@tbkka
Copy link
Contributor Author

tbkka commented Oct 28, 2020

@swift-ci Please test

@tbkka tbkka merged commit 7da78f7 into swiftlang:main Oct 28, 2020
ainu-bot added a commit to google/swift that referenced this pull request Oct 28, 2020
* 'main' of github.com:apple/swift:
  Verify that nil can cast to AnyHashable (swiftlang#34434)
@tbkka tbkka deleted the tbkka/castNilToAnyHashableTest branch August 1, 2024 16:36
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.

3 participants