Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-10-09 12:02:05 -0700 (Tue, 09 Oct 2007)
Revision: 12336
Log message:
Stricter static scoping for returns. See bug #701.
- Each return is annotated with "return <exp> from <id>"
where <id> is a unique id for the function.
- The return exception is caught only if the id matches.
Escaping returns abort.
public.G(x) =
value $x
F(g) =
G = $g
export
H() =
F(x => ...)
# This escaping function returns from H
return $x
export
H()
G(1)
This raises the exception:
*** omake error:
File /Users/jyh/projects/omake/jumbo/keyword/test/return/Test3: line 10, characters 8-17
uncaught return from H (File /Users/jyh/projects/omake/jumbo/keyword/test/return/Test3: line 8, characters 1-6)