ethereum / act

Smart contract specification language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpcted type checking error

d-xo opened this issue · comments

commented

Attempting to check equivalence between this spec: https://github.com/d-xo/verified-contracts/blob/4e9dea9a360448ffa6cb1e81e1f031edadefc78b/spec/utils/auth.act and this implementation: https://github.com/d-xo/verified-contracts/blob/4e9dea9a360448ffa6cb1e81e1f031edadefc78b/src/utils/auth.sol gives the following error:

Cannot find a valid type for expression EUTEntry (EMapping (AlexPn 440 26 14) (EVar (AlexPn 435 26 9) "wards") [EUTEntry (EVar (AlexPn 441 26 15) "usr")]):
26 | returns wards[usr]

Afaict this should be well typed, and I'm not sure whats going on here

This is not a bug. The last return expression has to be annotated with either pre or post, so that the timings can typecheck.