mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
20 lines
203 B
JavaScript
20 lines
203 B
JavaScript
class Foo {
|
|
#foo = 1;
|
|
|
|
test() {
|
|
class Nested {
|
|
#foo = 2;
|
|
|
|
[this.#foo]() {
|
|
}
|
|
}
|
|
|
|
return new Nested();
|
|
}
|
|
}
|
|
|
|
const f = new Foo();
|
|
expect(() => {
|
|
f.test();
|
|
}).toThrow();
|