Make constructors just methods.
* Eliminate "new" reserved word. * Allow "this" before a method definition to define a constructor. * Only create a default constructor for classes that don't define one.
This commit is contained in:
@@ -4,4 +4,4 @@ class Derived is Base {
|
||||
foo { super.doesNotExist(1) } // expect runtime error: Base does not implement 'doesNotExist(_)'.
|
||||
}
|
||||
|
||||
(new Derived).foo
|
||||
Derived.new().foo
|
||||
|
||||
Reference in New Issue
Block a user