yoday / stab-language

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

Overriding method error #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following code:

    [StaticClass]
    public class Main {

        public static void main( String[] args){

            Foo<Integer> f = new Bar<Integer>();
            f.foo(4);
        }
    }

    public class Foo<S> {

        void foo(S s){
            System.out.println("foo");
        }
    }

    public class Bar<T> : Foo<T>{

        void foo(T t){
            System.out.println("bar");
        }
    }

compiles fine, but throws the exception then running:

Exception in thread "main" java.lang.VerifyError: class pt.test.Bar overrides 
final method foo.(Ljava/lang/Object;)V
        at java.lang.ClassLoader.defineClass1(Native Method)

Original issue reported on code.google.com by ice.ta...@gmail.com on 9 Jul 2010 at 11:23

GoogleCodeExporter commented 9 years ago
This error is now detected by the compiler.

Original comment by stab.hac...@gmail.com on 28 Sep 2010 at 11:23