Details
-
Type:
Enhancement
-
Status: Resolved
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: 14
-
Fix Version/s: 15
-
Component/s: specification
-
Labels:
-
Subcomponent:
Description
Both of the following are accepted by the current `javac`, but probably should not be:
```
record Test(int[] args) {
public Test(int... args) {
this.args = args;
}
}
```
and
```
record Test(int... args) {
public Test(int[] args) {
this.args = args;
}
}
```
These both probably fall into the "an explicit canonical ctor should match the record descriptor exactly" bucket. There is little benefit to such divergence.
```
record Test(int[] args) {
public Test(int... args) {
this.args = args;
}
}
```
and
```
record Test(int... args) {
public Test(int[] args) {
this.args = args;
}
}
```
These both probably fall into the "an explicit canonical ctor should match the record descriptor exactly" bucket. There is little benefit to such divergence.
Attachments
Issue Links
- relates to
-
JDK-8236893 (IGNORE) Changes to Records specification
-
- Resolved
-