Possible regression in compilation for generic records for Java from 3.3.1 #19578
Closed
Description
Compiler version
Tested on:
- branch main: fails
- Released 3.3.1 succeeds
Minimized code
record R4<T>(t: T)
Output
[E161] Naming Error: tests/pos-java16+/java-records/R4.java:1:10 ----------------------------------------------------
1 |record R4<T>(T t) {}
| ^
| T is already defined as type T
|
| Note that overloaded methods must all be defined in the same group of toplevel definitions
Expectation
Compiles