vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.82k stars 790 forks source link

0.3.10: KeyError: 'type' inside assert #4074

Open ritzdorf opened 1 month ago

ritzdorf commented 1 month ago

Version Information

Issue description

When a string is being generated using uint2str inside an assert it sometimes fails with a KeyError.

PoC

@external
def foo():
    u: uint256 = 2000
    # This succeeds
    s: String[100] = uint2str(max(u, 1000))
    # This does not compile
    assert True, uint2str(max(u, 1000))

Fails with Error:

KeyError: 'type'