matthiasblaesing opened a new pull request, #9027:
URL: https://github.com/apache/netbeans/pull/9027
The JS parser should invalid constructs such as:
- Multiple declarations of constructor:
```javascript
class T {
constructor() {}
constructor() {}
}
```
- Private constructors:
```javascript
class T {
#constructor() {}
}
```
- Fields that are named constructor:
```javascript
class T {
constructor = X
}
```
- Generators named constructor:
```javascript
class T {
*constructor() {}
}
```
- Accessors named constructor:
```javascript
class S {
get constructor() {}
}
class T {
set constructor(value) {}
}
```
Private element must be declared only once:
- Accessor pair should be accepted
```javascript
class T {
get #X() {};
set #X(value) {};
}
```
- Reject plain field and and accessor
```javascript
class T {
#X = 1;
get #X() {};
}
```
```javascript
class T {
#X = 1;
set #X() {};
}
```
- Plain field and method should be rejected
```javascript
class T {
#X;
#X() {};
}
```
- Duplicate method should be rejected
```javascript
class T {
#X() {};
#X() {};
}
```
- Duplicate fields should be rejected
```javascript
class T {
#X;
#X;
}
```
- Mixed static declarations should be rejected
```javascript
class T {
get #X() {};
static set #X(value) {};
}
```
Closes: #8953
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists