rodrigogribeiro / solcore

1 stars 2 forks source link

Problem typing mutual definitions #2

Closed mbenke closed 2 months ago

mbenke commented 2 months ago

There seems to be a problem when typing mutually recursive definition (even without recursion, if use precedes declaration)

Example:

cabal run sol-core.cabal -- -f mutual.solc          
Results: Word

Results: forall a . a

contract Mutual {
   function main () {
      return f()
   }
   function f () {
      return 42
   }
}

main seems to be typed as forall a. a

rodrigogribeiro commented 2 months ago

Fixed on defunctionalization branch.