-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Milestone
Description
Contract fields "leak" to outside functions:
function foo() { let val=1; val=2; }
contract Simple {
val : word ;
function getVal () -> word {
return val ;
}
function main () -> word {
return getVal();
}
}
sol-core: ElabTree - impossible: assignment outside of contract
CallStack (from HasCallStack):
error, called at src/Solcore/Frontend/Syntax/ElabTree.hs:452:23 in sol-core-0.0.0.0-inplace:Solcore.Frontend.Syntax.ElabTree
this is probably due to the fact that val is treated as contract field in foo