managed-commons / stab-language

Automatically exported from code.google.com/p/stab-language
Apache License 2.0
5 stars 3 forks source link

Illegal generics code #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The generics code is invalid:

using java.io;
using java.net;
using java.util;
using java.lang;

package test {

    public class Main {

        public static void main(String[] args){
            Set<?> copy = new HashSet<?>(); // illegal
            Set<?> s2 = new HashSet<Object>(); // illegal

            System.out.println("DONE");
        }
    }
}

Original issue reported on code.google.com by ice.ta...@gmail.com on 29 Sep 2010 at 9:42

GoogleCodeExporter commented 9 years ago
In java only Set<?> copy = new HashSet<?>(); is illegal.
I modified the compiler to report an error in this case.

Original comment by stab.hac...@gmail.com on 29 Sep 2010 at 7:20