Skip to content

Wrong emitted metadata for nested generic types #17797

Description

@auduchinok

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.

Activity

  1. added this to the Backlog milestone on Sep 26, 2024
  2. vzarytovskii commented on Sep 26, 2024

    @vzarytovskii
    Member

    Try with realsig-

  3. auduchinok commented on Sep 26, 2024

    @auduchinok
    MemberAuthor

    @vzarytovskii Can confirm it helps, thanks!

  4. vzarytovskii commented on Sep 26, 2024

    @vzarytovskii
    Member

    @vzarytovskii Can confirm it helps, thanks!

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

  5. self-assigned this
    on Sep 26, 2024
  6. KevinRansom commented on Sep 26, 2024

    @KevinRansom
    Contributor

    Yes this is real ... needs fixing.

  7. vzarytovskii commented on Nov 11, 2024

    @vzarytovskii
    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+?

  8. KevinRansom commented on Nov 13, 2024

    @KevinRansom
    Contributor

    @vzarytovskii i do want to keep it open.

  9. added a commit that references this issue on Jan 14, 2025
    9f360ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions