yoday / stab-language

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

Bad error message #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The code:

class Foo<T>
    {

    }

    class Bar : Foo<Bar>
    {
        Bar(): super(this){
        }

        public void Test ()
        {
        }
    }

returns the message:
error 262: Keyword 'this' is not valid in a static context

but since this is a constructor, there is no 'static' context. In java, the 
same code, return a more descriptive message:
Cannot refer to 'this' nor 'super' while explicitly invoking a constructor

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

GoogleCodeExporter commented 9 years ago

Original comment by stab.hac...@gmail.com on 27 Oct 2010 at 12:35