In the constructor of a derived class, accessing ``++this++`` or ``++super++`` before ``++super()++`` is called raises a reference error. ``++super()++`` should always be called first.


== Noncompliant Code Example

----
class Bar {
}

class Foo extends Bar {
    constructor() {
        this.val = 0;   // Noncompliant
        super();
    }
}

class Foobar extends Foo {
    constructor() {
        super.val = 1;   // Noncompliant
        super();
    }
}

----


== Compliant Solution

----
class Bar {
}

class Foo extends Bar {
    constructor() {
        super();
        this.val = 0;
    }
}

class Foobar extends Foo {
    constructor() {
        super();
        super.val = 1;
    }
}
----



ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::message.adoc[]

include::highlighting.adoc[]

'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
