asoffer / Icarus

An experimental general-purpose programming language
Apache License 2.0
9 stars 2 forks source link

Jumping from inside a scope asserts #89

Closed asoffer closed 2 years ago

asoffer commented 2 years ago

Reproducer:

-- ::= import "core.ic"
scope {
  enter ::= jump () {
    if (true) then { goto done() }
  }
  exit ::= () -> () {}
}

We're attempting to do type verification for the if scope but when we look for possible returns/yields/gotos and we se the goto, we try to find out where it maps to, but it's not in the stack at all because we started with the if rather than the enclosing jump.