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

Wrong emitted metadata for nested generic types #17797

Open
auduchinok opened this issue Sep 26, 2024 · 6 comments
Open

Wrong emitted metadata for nested generic types #17797

auduchinok opened this issue Sep 26, 2024 · 6 comments
Assignees
Labels
Area-Compiler-CodeGen IlxGen, ilwrite and things at the backend Bug
Milestone

Comments

@auduchinok
Copy link
Member

auduchinok commented Sep 26, 2024

The generated types for (at least some) closures miss type parameters from their containing types.
When defining a nested type, it should redefine all type parameters from its containing type (see I.10.7.1 from ECMA-335).

Closures like Internal.Utilities.Collections.AgedLookup`3+-ctor@25-5 miss their parent's type parameters and have only 1 of the 4 type parameters needed. This was caught by an assert in R#/Rider metadata reading code. We're disabling the assert for now, but it looks like the code generation should be fixed on the F# compiler side.

@vzarytovskii
Copy link
Member

Try with realsig-

@auduchinok
Copy link
Member Author

@vzarytovskii Can confirm it helps, thanks!

@vzarytovskii
Copy link
Member

@vzarytovskii Can confirm it helps, thanks!

Thanks. We turned it off by default in rc2, but compiler itself still builds with realsig

@KevinRansom KevinRansom self-assigned this Sep 26, 2024
@KevinRansom KevinRansom added Area-Compiler-CodeGen IlxGen, ilwrite and things at the backend and removed Needs-Triage labels Sep 26, 2024
@KevinRansom KevinRansom modified the milestones: Backlog, September-2024 Sep 26, 2024
@KevinRansom
Copy link
Member

Yes this is real ... needs fixing.

@T-Gro T-Gro modified the milestones: October-2024, November-2024 Nov 7, 2024
@vzarytovskii
Copy link
Member

This is fixed in rtm (by rolling back the realsig), @KevinRansom do you want to keep it open to track the fix with realsig+?

@KevinRansom
Copy link
Member

@vzarytovskii i do want to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-CodeGen IlxGen, ilwrite and things at the backend Bug
Projects
Status: New
Development

No branches or pull requests

4 participants