__WhereVal/__WhereRef on fields

Ali Ebrahimi ali.ebrahimi1781 at gmail.com
Wed Dec 16 17:37:26 UTC 2015


Hi,
Is compiler supposed to handle restrictions on fields?

public class Main {

    public static class Test<any T>{
        public __WhereVal(T) int x;
        public __WhereRef(T) long x2;
    }
    public static void main(String[] args) {
        Test<int> ti = new Test<int>();
        long p = ti.x2; //<=======================
    }
}


-- 

Best Regards,
Ali Ebrahimi



More information about the valhalla-dev mailing list