Use "construct" instead of "this" to define constructors.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Ported from the Python version.
|
||||
|
||||
class Tree {
|
||||
this new(item, depth) {
|
||||
construct new(item, depth) {
|
||||
_item = item
|
||||
if (depth > 0) {
|
||||
var item2 = item + item
|
||||
|
||||
Reference in New Issue
Block a user