No more default constructors.

Fixes #296.
This commit is contained in:
Bob Nystrom
2015-09-01 08:16:04 -07:00
parent 36f3059e48
commit 2e83f056c1
86 changed files with 248 additions and 133 deletions

View File

@ -1,4 +1,5 @@
class Foo {
construct new() {}
write { IO.print(_field) }
}

View File

@ -1,4 +1,6 @@
class Foo {
construct new() {}
set(a, b, c, d, e) {
_a = a
_b = b

View File

@ -1,9 +1,13 @@
class Outer {
construct new() {}
method {
_field = "outer"
IO.print(_field) // expect: outer
class Inner {
construct new() {}
method {
_field = "inner"
IO.print(_field) // expect: inner

View File

@ -1,4 +1,5 @@
class Foo {
construct new() {}
write { IO.print(_field) } // Compile a use of the field...
init { _field = "value" } // ...before an assignment to it.
}