-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
None
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Ubuntu 22.04.2 LTS
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc.admin1.jdk-jdk-20-34)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc.admin1.jdk-jdk-20-34, mixed mode)
A DESCRIPTION OF THE PROBLEM :
When a user tries to extend a record then 2 errors are produced. One that states that inheritance from a final record is not possible, which is good. However, there is another, more prominent error message that complains about the constructor (constructor ... in record ... cannot be applied to given types). This second error message and description is quite a bit bigger, hence the first error can be easily overlooked, and generally the second error is not necessary.
It would be good if the second error can be removed to avoid unnecessary confusion in this case.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public record Record2(int a, int b){
}
public class TestClass extends Record2{
public TestClass(){}
}
FREQUENCY : always
Ubuntu 22.04.2 LTS
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc.admin1.jdk-jdk-20-34)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc.admin1.jdk-jdk-20-34, mixed mode)
A DESCRIPTION OF THE PROBLEM :
When a user tries to extend a record then 2 errors are produced. One that states that inheritance from a final record is not possible, which is good. However, there is another, more prominent error message that complains about the constructor (constructor ... in record ... cannot be applied to given types). This second error message and description is quite a bit bigger, hence the first error can be easily overlooked, and generally the second error is not necessary.
It would be good if the second error can be removed to avoid unnecessary confusion in this case.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public record Record2(int a, int b){
}
public class TestClass extends Record2{
public TestClass(){}
}
FREQUENCY : always