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:
@@ -1010,7 +1010,7 @@ class Foo {
|
||||
method999 { 1 }
|
||||
}
|
||||
|
||||
var foo = new Foo
|
||||
var foo = Foo.new()
|
||||
var result = 0
|
||||
result = result + foo.method000
|
||||
result = result + foo.method001
|
||||
|
||||
Reference in New Issue
Block a user