Skip to content

PANIC in ElabTree #237

@mbenke

Description

@mbenke

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions