Skip to content

Inherited accessors break when base is type-erased #725

@TheLartians

Description

@TheLartians

When extending type-erased bases with accessors, the accessors are called with incorrect this.

Example

const A = class {
    get value(): this {
        return this;
    }
} as any;

class B extends A {
    
}

const b = new B();
console.assert(b.value === b); // boom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions