Skip to content

ambiguous type error during tuple declaration where value is ifexp #4753

@cyberthirst

Description

@cyberthirst

Version Information

  • vyper Version (output of vyper --version): 90c952c

What's your issue about?

def foo():
    gen_var0: (bytes1, address[1]) = (0x11, [0x0000000000000000000000000000000000000001]) if True else (0x11, [0x0000000000000000000000000000000000000001])
vyper.exceptions.StructureException: Ambiguous type

  contract "tests/custom/test.vy:2", function "foo", line 2:44 
       1 def foo():
  ---> 2     gen_var0: (bytes1, address[1]) = (0x11, [0x0000000000000000000000000000000000000001]) if True else (0x11, [0x0000000000000000000000000000000000000001])
  ---------------------------------------------------^
       3

the poc should compile, and the error message for ambiguos types should be improved anyway - what was expected and what is the actual type would be better

found by ivy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions