If a nested class's `superClass` redeclares the outer class's private field and access it in a computed key, that should fail. Follow up to #11405.
19 lines
221 B
JavaScript
19 lines
221 B
JavaScript
class Foo {
|
|
#foo = 1;
|
|
|
|
test() {
|
|
class Nested extends class {
|
|
[this.#foo] = 2;
|
|
} {
|
|
#foo = 3;
|
|
}
|
|
|
|
return new Nested();
|
|
}
|
|
}
|
|
|
|
const f = new Foo();
|
|
expect(() => {
|
|
f.test();
|
|
}).not.toThrow();
|