basmith / stab-language

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

Compiler ignoring SuppressWarnings #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The compiler is ignoring the annotation "SuppressWarnings" on warning messages:

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

package test {

    public class Main {

        [SuppressWarnings({"unchecked"})]
        public static void main(String[] args){
            List s = new ArrayList();

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

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

GoogleCodeExporter commented 8 years ago
This annotation is not supported by the compiler.
Instead use the #pragma prepocessor directive:

#pragma warning disable <warning number list>

In your case:

#pragma warning disable 252

You can enable the warning again later in the source code with:

#pragma warning restore

Original comment by stab.hac...@gmail.com on 29 Sep 2010 at 6:33