Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible regression in compilation for generic records for Java from 3.3.1 #19578

Closed
yilinwei opened this issue Jan 31, 2024 · 1 comment · Fixed by #19583
Closed

Possible regression in compilation for generic records for Java from 3.3.1 #19578

yilinwei opened this issue Jan 31, 2024 · 1 comment · Fixed by #19583

Comments

@yilinwei
Copy link
Contributor

yilinwei commented Jan 31, 2024

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

@yilinwei yilinwei added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 31, 2024
@yilinwei yilinwei changed the title Regression in compilation for generic records for Java Regression in compilation for generic records for Java from 3.3.1 Jan 31, 2024
@yilinwei yilinwei changed the title Regression in compilation for generic records for Java from 3.3.1 Possible regression in compilation for generic records for Java from 3.3.1 Jan 31, 2024
yilinwei added a commit to yilinwei/dotty that referenced this issue Jan 31, 2024
@bishabosha
Copy link
Member

this is duplicated by #18639

@bishabosha bishabosha closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@bishabosha bishabosha added stat:duplicate and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 1, 2024
yilinwei added a commit to yilinwei/dotty that referenced this issue Feb 1, 2024
This fixes a whole host of subtle issues.

 - The type parameter was not stamped correctly on the constructor
   causing the original error
 - The parsed record was not stamped with `JavaDefined`, which meant
   the duplicate constructors in the case of overrides were not
   removed.
bishabosha added a commit that referenced this issue Feb 9, 2024
This is a dependency of #19577 and should be reviewed and merged first.

fixes #18639
fixes #19386
fixes #19578
@Kordyjan Kordyjan added this to the 3.4.1 milestone Feb 14, 2024
WojciechMazur pushed a commit that referenced this issue Jun 28, 2024
WojciechMazur pushed a commit that referenced this issue Jun 28, 2024
This fixes a whole host of subtle issues.

 - The type parameter was not stamped correctly on the constructor
   causing the original error
 - The parsed record was not stamped with `JavaDefined`, which meant
   the duplicate constructors in the case of overrides were not
   removed.

[Cherry-picked f7eb589]
WojciechMazur pushed a commit that referenced this issue Jun 30, 2024
WojciechMazur pushed a commit that referenced this issue Jun 30, 2024
This fixes a whole host of subtle issues.

 - The type parameter was not stamped correctly on the constructor
   causing the original error
 - The parsed record was not stamped with `JavaDefined`, which meant
   the duplicate constructors in the case of overrides were not
   removed.

[Cherry-picked f7eb589]
WojciechMazur pushed a commit that referenced this issue Jun 30, 2024
WojciechMazur pushed a commit that referenced this issue Jun 30, 2024
This fixes a whole host of subtle issues.

 - The type parameter was not stamped correctly on the constructor
   causing the original error
 - The parsed record was not stamped with `JavaDefined`, which meant
   the duplicate constructors in the case of overrides were not
   removed.

[Cherry-picked f7eb589]
WojciechMazur pushed a commit that referenced this issue Jun 30, 2024
WojciechMazur pushed a commit that referenced this issue Jun 30, 2024
This fixes a whole host of subtle issues.

 - The type parameter was not stamped correctly on the constructor
   causing the original error
 - The parsed record was not stamped with `JavaDefined`, which meant
   the duplicate constructors in the case of overrides were not
   removed.

[Cherry-picked f7eb589]
WojciechMazur added a commit that referenced this issue Jul 1, 2024
)

Backports #19583 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants