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

public class SeparableSample10 {
    public static class Yikes extends RuntimeException {
        public separable Yikes() { }
    }
    
    public static class Whoa extends Yikes {
    }
    
    public static class OhKay extends RuntimeException {
        public Code<Integer> c;
        public separable OhKay(final int i) {
            c = <| i |>;
        }
    }

    public static class OhKayMethodReturn extends RuntimeException {
        public Code<Integer> foo() { return <| 1 |>; }
        public separable OhKayMethodReturn() {
        }
    }

    public static class OhKayMethodParam extends RuntimeException {
        public void foo(Code<Integer> c) { }
        public separable OhKayMethodParam() {
        }
    }

    public static class OhNo extends RuntimeException {
        public Code<Integer> c;
        public separable OhNo(Code<Integer> i) {
            c = i;
        }
    }
    
    public static separable void m() throws Throwable{
        // throw new Throwable();
        // throw new RuntimeException();
        // throw new Yikes();
        // throw new Whoa();
        throw new OhKay(1);
	// throw new OhKayMethodReturn();
	// throw new OhKayMethodParam();
        /* RuntimeException e = new RuntimeException () {
            public Code<Integer> meth () { return <| 1 |>; }
        };
        throw e; // error */
        // throw new OhNo(<|1|>); // error
	/* final int i = 1;
	throw new RuntimeException() {
		public Code<Integer> foo() { return <| i |>; }
		}; // error */
    }
}
