Typechecker: bad error message when referencing an undeclared storage var
d-xo opened this issue · comments
The following spec errors out with:
*** Exception: Internal error: Type.typedExp. Expr: EPreEntry (AlexPn 246 15 11) "x" []
CallStack (from HasCallStack):
error, called at Type.hs:311:29 in act-0.1.0.0-inplace-act-internal:Type
constructor of C
interface constructor(uint24 _x)
creates
uint24 x := _x
behaviour ret of C
interface ret()
returns pre(x)
The issue is that x
is not declared in the storage
block of ret
, but the error message is terrible.
We no longer require that storage variables are explicitly mentioned in the storage blocks of functions.