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

Make SyntaxBuildableType hashable #527

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Jul 27, 2022

This is a small change that implements __hash__ for SyntaxBuildableType on the Python-side, thereby making it possible to use SyntaxBuildableType in sets and dictionaries as keys.

Since the type already implements a fieldwise __eq__, having a corresponding __hash__ feels like a natural extension.

Note that the Swift version of this type (in SwiftSyntaxBuilderGeneration) is also Hashable.

@fwcd fwcd requested a review from ahoppen as a code owner July 27, 2022 20:28
@fwcd
Copy link
Member Author

fwcd commented Jul 27, 2022

@swift-ci please test

@fwcd fwcd merged commit cce1d9c into swiftlang:main Jul 27, 2022
@fwcd fwcd deleted the syntax-buildable-type-hash branch July 27, 2022 22:10
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.

None yet

2 participants