Skip to content

Must call super constructor in derived class before accessing 'this' or returning from derived constructor #265

@GitaiQAQ

Description

@GitaiQAQ
class Base {}

class Test extends Base {
    constructor() {
        super();
        () => {
            this.aa = 1;
        }
    }
}
$ npx buble test.js -n classes
class Base {}

class A extends Base {
    constructor() {
        var this$1 = this;

        super();
        !function() {
            this$1.aa = 1;
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions