Kanon icon indicating copy to clipboard operation
Kanon copied to clipboard

Is inheritance supported?

Open masuhar opened this issue 6 years ago • 2 comments

With this code

class C { }
class D extends C {
    constructor() {}
}
var v = new D()

I get an error Error?: |this| used uninitialized in D class constructor

image

It reminds me a restriction in Java, where you should write a call to the super-constructor at the beginning of a constructor. You are also not safe to access fields of this before finishing the call to the super-constructor.

masuhar avatar May 01 '18 07:05 masuhar