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 type of storage variables containing interface #2697

Merged
merged 8 commits into from
Mar 12, 2022

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Mar 12, 2022

What I did

fix #2696

Commit message

`global_context.py` had some old helper function called               
`get_item_name_and_attributes` which behaved incorrectly for complex  
types containing interfaces (specifically, an array of interfaces like
`MyInterface[3]`). Luckily, `parse_type` works better now and the code
seems to work after removing `get_item_name_and_attributes`. We also had    
a ContractRecord class which is now unused, so I removed it.          
             
Also now allow interfaces in interface signatures

How to verify it

Description for the changelog

Cute Animal Picture

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2022

Codecov Report

Merging #2697 (83f9e38) into master (aa8affb) will increase coverage by 0.11%.
The diff coverage is 100.00%.

❗ Current head 83f9e38 differs from pull request most recent head 62923be. Consider uploading reports for the commit 62923be to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2697      +/-   ##
==========================================
+ Coverage   86.43%   86.54%   +0.11%     
==========================================
  Files          91       91              
  Lines        9883     9855      -28     
  Branches     2492     2481      -11     
==========================================
- Hits         8542     8529      -13     
+ Misses        839      830       -9     
+ Partials      502      496       -6     
Impacted Files Coverage Δ
vyper/ast/signatures/function_signature.py 87.50% <ø> (-0.31%) ⬇️
vyper/codegen/types/types.py 84.92% <ø> (ø)
vyper/codegen/expr.py 79.50% <100.00%> (ø)
vyper/codegen/global_context.py 73.21% <100.00%> (+3.87%) ⬆️
vyper/codegen/stmt.py 88.62% <100.00%> (ø)
vyper/builtin_functions/functions.py 88.68% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa8affb...62923be. Read the comment docs.

@charles-cooper charles-cooper merged commit d4b1e3f into vyperlang:master Mar 12, 2022
@charles-cooper charles-cooper deleted the fix/interface_assign branch March 12, 2022 03:04
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.

type parsing fails for array of interfaces
3 participants