Open ritzdorf opened 4 months ago
vyper --version
When an IfExp node is passed to _handle_modification, the function fails to handle it and the compiler panics with an unhandled exception.
IfExp
_handle_modification
The following examples demonstrate this behavior:
@external def bar(): d: DynArray[uint256, 2] = [1,2] (d if True else d)[1] = 1 # CompilerPanic: unhandled exception
@external def bar(): d: DynArray[uint256, 2] = [1] x:uint256 = (d if True else d).pop() # CompilerPanic: unhandled exception
@external def bar(): d: DynArray[uint256, 2] = [1] (d if True else d).append(1) # CompilerPanic: unhandled exception
Version Information
vyper --version
OR linkable commit hash vyperlang/vyper@Issue Description
When an
IfExp
node is passed to_handle_modification
, the function fails to handle it and the compiler panics with an unhandled exception.POC
The following examples demonstrate this behavior: