Skip to content

Fix #17797 -- Realsig+ generates nested closures with incorrect Generic arguments - #17877

Merged
KevinRansom merged 20 commits into
dotnet:mainfrom
KevinRansom:fix17797
Jan 14, 2025
Merged

Fix #17797 -- Realsig+ generates nested closures with incorrect Generic arguments#17877
KevinRansom merged 20 commits into
dotnet:mainfrom
KevinRansom:fix17797

Conversation

@KevinRansom

@KevinRansomKevinRansom commented Oct 13, 2024

Copy link
Copy Markdown
Contributor

When realsig+ is specified we generate closures as nested classes rather than classes at the same level as the class that the closures are for. This eliminates the need for members of the class to be internal allowing us to make the members private to reflect their source visibility.

Issue 17797 occurs because the closures were generated without the generic parameters. This fix addresses that by getting the generic parameters from the argument/typar environment.

@KevinRansom
KevinRansom requested a review from a team as a code ownerOctober 13, 2024 04:04
@KevinRansom
KevinRansom marked this pull request as draft October 13, 2024 04:04
@github-actions

github-actionsBot commented Oct 13, 2024

Copy link
Copy Markdown
Contributor

❗ Release notes required


✅ Found changes and release notes in following paths:

Change pathRelease notes pathDescription
src/Compilerdocs/release-notes/.FSharp.Compiler.Service/9.0.300.md

@KevinRansom
KevinRansomforce-pushed the fix17797 branch 4 times, most recently from 35a8aad to a7eeda8CompareOctober 20, 2024 01:44
@KevinRansom
KevinRansomforce-pushed the fix17797 branch 5 times, most recently from bb06ffa to 1d562efCompareNovember 8, 2024 20:58
@KevinRansom
KevinRansomforce-pushed the fix17797 branch 8 times, most recently from e13abad to ef80877CompareNovember 20, 2024 01:49
@KevinRansomKevinRansom changed the title WIP : Attempt to fix #17797Fix #17797 -- Realsig+ generates nested closures with incorrect Generic argumentsNov 20, 2024
@KevinRansom
KevinRansom marked this pull request as ready for review November 20, 2024 05:20
Comment threadtests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs
@T-Gro

Copy link
Copy Markdown
Member

My review is finished, but let's wait for the ilverify for realsig as a CI step as well.

…is/SymbolicOperators.fs
Yeah the comments are pointless.
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

@KevinRansomKevinRansom left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make these changes, they are good suggestions.

Comment threadtests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs

@psfinakipsfinaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't find anything suspicious here, well tested IMO.

Comment threadDEVGUIDE.md Outdated
KevinRansomand others added 4 commits January 10, 2025 12:24
@KevinRansom
KevinRansom enabled auto-merge (squash) January 13, 2025 16:42
@KevinRansom
KevinRansom merged commit 9f360ed into dotnet:mainJan 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants

@KevinRansom@T-Gro@psfinaki