vyper
vyper copied to clipboard
bug: compiler panic when returning empty constant
Version Information
- vyper Version (output of
vyper --version): a0d9b1ff0206c7916bce7987164dbdb69f460c47 - OS: linux
- Python Version (output of
python --version): 3.12.3
What's your issue about?
The following contracts that used to compile in v0.3.9 now fail compilation. I have traced it to 56c4c9dbc09d6310bf132cfde3fdbe1431189a9b.
BOO: constant(uint256[3]) = empty(uint256[3])
@external
def foo() -> uint256[3]:
return BOO
vyper.exceptions.CompilerPanic: unreachable!
contract "tmp/empty_list.vy:7", function "foo", line 7:4
6 #def foo() -> DynArray[uint256, 3]:
---> 7 return BOO
-----------^
8 #return empty(uint256[3])
This is an unhandled internal compiler error. Please create an issue on Github to notify the developers!
BOO: constant(DynArray[uint256, 3]) = empty(DynArray[uint256, 3])
@external
def foo() -> DynArray[uint256, 3]:
return BOO
vyper.exceptions.CompilerPanic: cannot dereference non-pointer type
contract "tmp/empty_list.vy:7", function "foo", line 7:4
6 def foo() -> DynArray[uint256, 3]:
---> 7 return BOO
-----------^
8 #return empty(uint256[3])
This is an unhandled internal compiler error. Please create an issue on Github to notify the developers!
How can it be fixed?
Fill this in if you know how to fix it.
Structs are affected too.