managed-commons / stab-language

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

Static market as static should only have static methods #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the following code:

using java.lang;
using stab.lang;

package examples {

    [StaticClass]
    public final class Main {
        public void notStaticMethod(){}

        public static void main(String[] args){
            System.out.println("StaticClass with an instance method");
        }
    }
}

The class "Main" is marked as a static class, but the method "notStaticMethod" 
is not static. The compiler should report an error.

Original issue reported on code.google.com by ice.ta...@gmail.com on 19 Jun 2010 at 1:10

GoogleCodeExporter commented 9 years ago
A compile error is now reported for instance members

Original comment by stab.hac...@gmail.com on 26 Jun 2010 at 2:02