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

AttributeError: 'str' object has no attribute 'compare_type' #3048

Closed
AntonD3 opened this issue Aug 8, 2022 · 2 comments · Fixed by #3061
Closed

AttributeError: 'str' object has no attribute 'compare_type' #3048

AntonD3 opened this issue Aug 8, 2022 · 2 comments · Fixed by #3061
Labels
bug - typechecker issue with typechecker

Comments

@AntonD3
Copy link

AntonD3 commented Aug 8, 2022

Version Information

  • vyper Version (output of vyper --version): 0.3.3
  • OS: macOS
  • Python Version (output of python --version): 2.7.16

What's your issue about?

vyper-0.3.3 error: AttributeError: 'str' object has no attribute 'compare_type'
[14131] Failed to execute script 'vyper_compile' due to unhandled exception!
event E:
    _: DynArray[DynArray[uint256, 5], 5]

@external
def createEvent(x: uint256):
    arr: DynArray[DynArray[uint256, 5], 5] = [[], []]
    arr[0] = [0, 0]
    arr[1] = [0, 0]
    arr[0][0] = x
    arr[0][1] = x + 1
    arr[1][0] = x + 2
    arr[1][1] = x + 3
    log E(arr)
    
@charles-cooper charles-cooper added the bug - typechecker issue with typechecker label Aug 10, 2022
@charles-cooper
Copy link
Member

note to self: revisit after refactoring type system

@tserg
Copy link
Collaborator

tserg commented Aug 11, 2022

minimal repro

@external
def createEvent(x: uint256):
    arr: DynArray[DynArray[uint256, 5], 5] = [[], []]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - typechecker issue with typechecker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants