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

type parsing fails for array of interfaces #2696

Closed
mhorsley30896 opened this issue Mar 11, 2022 · 0 comments · Fixed by #2697
Closed

type parsing fails for array of interfaces #2696

mhorsley30896 opened this issue Mar 11, 2022 · 0 comments · Fixed by #2697

Comments

@mhorsley30896
Copy link

mhorsley30896 commented Mar 11, 2022

Version Information

  • vyper: 0.3.1
  • OS: linux
  • Python: 3.9.7

What's your issue about?

When I try compile the following code

# @version 0.3.1

interface MyInterface:
    def some_func(): nonpayable

my_interface: MyInterface[3]
idx: uint256

@external
def __init__():
	
	self.my_interface[self.idx] = MyInterface(ZERO_ADDRESS)

@external
def use_an_interface():
	
	pass

I get the following error

Error compiling: contracts/MyContract.vy
vyper.exceptions.TypeCheckFailure: Subscript node did not produce LLL. vyper.ast.nodes.Subscript:
     11
---> 12 	self.my_interface[self.idx] = MyInterface(ZERO_ADDRESS)
---------^
     13
@charles-cooper charles-cooper changed the title Subscript node did not produce LLL type parsing fails for array of interfaces Mar 12, 2022
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 a pull request may close this issue.

1 participant