1
0
forked from Mirror/wren

Use "construct" instead of "this" to define constructors.

This commit is contained in:
Bob Nystrom
2015-07-21 07:24:53 -07:00
parent ed8ec262e4
commit 71ab3ca887
31 changed files with 68 additions and 81 deletions

View File

@ -1,5 +1,5 @@
class Foo {
this new() { _field = "Foo field" }
construct new() { _field = "Foo field" }
closeOverGet {
return Fn.new { _field }

View File

@ -1,6 +1,6 @@
// This test exists mainly to make sure the GC traces instance fields.
class Node {
this new(left, value, right) {
construct new(left, value, right) {
_left = left
_value = value
_right = right