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

fix: allow enum as mapping key #3256

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

tserg
Copy link
Collaborator

@tserg tserg commented Jan 26, 2023

What I did

Fix #3247.

How I did it

Set _as_hashmap_key = True for EnumT.

How to verify it

See test.

Commit message

fix: allow enum as mapping key

Description for the changelog

Allow enum as mapping key

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2023

Codecov Report

Merging #3256 (9313549) into master (02339df) will decrease coverage by 0.31%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #3256      +/-   ##
==========================================
- Coverage   88.88%   88.57%   -0.31%     
==========================================
  Files          84       84              
  Lines       10598    10595       -3     
  Branches     2212     2144      -68     
==========================================
- Hits         9420     9385      -35     
- Misses        769      801      +32     
  Partials      409      409              
Impacted Files Coverage Δ
vyper/semantics/types/user.py 85.62% <100.00%> (+0.04%) ⬆️
vyper/codegen/arithmetic.py 75.00% <0.00%> (-9.72%) ⬇️
vyper/ir/s_expressions.py 91.17% <0.00%> (-2.95%) ⬇️
vyper/builtins/functions.py 89.20% <0.00%> (-1.23%) ⬇️
vyper/ast/nodes.py 93.63% <0.00%> (-0.16%) ⬇️
vyper/codegen/abi_encoder.py 88.78% <0.00%> (-0.11%) ⬇️
vyper/semantics/analysis/module.py 86.15% <0.00%> (-0.08%) ⬇️
vyper/codegen/core.py 86.67% <0.00%> (-0.03%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tserg tserg marked this pull request as ready for review January 27, 2023 10:27
@charles-cooper charles-cooper merged commit ddb402b into vyperlang:master Feb 1, 2023
@tserg tserg deleted the fix/enum_mapping branch February 1, 2023 01:47
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.

HashMap no longer accepts Enum as key type
3 participants