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

public class SeparableSample2
{
    public static class Var<C>
    {
        Code<C> c;
        separable Var (Code<C> _c) { c = _c; }
        Code<C> get () { return c; }
    }
    
    public abstract static class Foo
    {
        abstract separable Var<Integer> foo (Integer x);
    }
    
    public static separable <E> SafeCode<E> csp (final E x)
    {
        return <|x|>; // error
    }
    
    public static void main (String args[])
    {
        Code<Integer> x;
        <|(new Foo () {
            public separable Var<Integer> foo (final Integer x)
            {
                return `(csp (new Var<Integer> (<|x|>)));
            }
        }).foo (5).get ()|>.run ();
    }
    
}
