Skip to content

super property access should be allowed in computed property names when class is nested in the method of another class #6038

@vladima

Description

@vladima
class A {
    foo() { return 1; }
}

class B extends A {
    foo() { return 2; }
    bar() {
        console.log(super.foo());
        return class {
            [super.foo()]() {
                return 100;
            }
        }
    }
}

let x = new B().bar();
let y = new x();
console.log(y[1]())

This is legal ES6 code and it should not error

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions