This bounty is no longer available
Web3 DAO | Ethereum Foundation Logo

Typechecker: bad error message when referencing an undeclared storage var

Organization

Ethereum Foundation

Deadline

N/A

Status

ENDED


INSTRUCTIONS

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.