import edu.rice.cs.mint.runtime.*;

public class EscapeSample2 {
    public static separable void m() { }
    public static separable void n() { }
    public static void main (String [] args) {
        SafeCode<Integer> c1 = <| 1 |>;
        SafeCode<Void> c2 = <| { m(); n(); } |>;
        Code<Void> c = <| {
            int i=`(c1);
            `c2;
            System.out.println("i="+i);
            // `c1; // error: must be SafeCode<Void>
        } |>;
        System.out.println (c.run ());
    }
}
