yoday / stab-language

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

Changing the order of interface and extended class should return an error #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example,

    public interface Test {
        void foo(int i);
    }

    public class Super {
        public static int x = 33;
    }

    public class Main :  Test, Super{

        public Main(): super(super.x){
        }

        public Main(Main m){
        }

        public static void main( String[] args){
            System.out.println("DONE");
        }
    }

the compiler returns:

error 287: Class 'pt.test.Main' cannot have multiple base classes: 
'pt.test.Super' and '<null>'

and the message should not show "<null>".

Original issue reported on code.google.com by ice.ta...@gmail.com on 3 Jul 2010 at 2:03

GoogleCodeExporter commented 9 years ago
The compiler now reports the message: "Base class 'pt.test.Super' must come 
before any interfaces".

Original comment by stab.hac...@gmail.com on 5 Jul 2010 at 12:10