Given that private fields can only be used within classes, any code using them must be in a strict mode context. As private fields cannot be deleted, throw an early SyntaxError.
7 lines
59 B
JavaScript
7 lines
59 B
JavaScript
class Foo {
|
|
#x;
|
|
constructor() {
|
|
delete #x.d;
|
|
}
|
|
}
|