Open ritzdorf opened 4 months ago
vyper --version
Indexing an empty array is not caught by the type checker and causes the code generation to fail with a compiler panic.
Compiling the following contract will cause a compiler panic:
@external def bar(x:uint128): a:uint128 = empty(DynArray[uint128,2])[0]
vyper.exceptions.TypeCheckFailure: indexing into zero array not allowed
Version Information
vyper --version
OR linkable commit hash vyperlang/vyper@Issue Description
Indexing an empty array is not caught by the type checker and causes the code generation to fail with a compiler panic.
POC
Compiling the following contract will cause a compiler panic: