Skip to content

Name resolution: CheckIWSAM only needs the intrinsic methods - #20490

Open
auduchinok wants to merge 1 commit into
dotnet:mainfrom
auduchinok:nameres-iwsamIntrinsicOnly-main
Open

Name resolution: CheckIWSAM only needs the intrinsic methods#20490
auduchinok wants to merge 1 commit into
dotnet:mainfrom
auduchinok:nameres-iwsamIntrinsicOnly-main

Conversation

@auduchinok

@auduchinok auduchinok commented Sep 8, 2026

Copy link
Copy Markdown
Member

CheckIWSAM warns when an interface carrying static abstract members is used as a type. It asked
AllMethInfosOfTypeInScope for every method of the type, which is IntrinsicMethInfosOfType @ ExtensionMethInfosOfTypeInScope, and with ResultCollectionSettings.AllResults
the extension half always runs. The predicate then discards all of it through not meth.IsExtensionMember.
This calls IntrinsicMethInfosOfType directly with the arguments AllMethInfosOfTypeInScope passed it.

solution base ms delta
ReSharper.FSharp 17262 −520 (−3.0%)
Oxpecker 3004 −72 (−2.4%)
FsToolkit.ErrorHandling 5928 −122 (−2.1%)
FSharp.Compiler.Service 20190 −280 (−1.4%)
IcedTasks 11061 −118 (−1.1%)
Fantomas 5220 −53 (−1.0%)
Prime 3010 −24 (−0.8%)
consoleapp 158 +11 (+7.0%)

AllMethInfosOfTypeInScope is IntrinsicMethInfosOfType @ ExtensionMethInfosOfTypeInScope,
and with AllResults the extension half always runs, but the predicate discards every
extension member it finds. Call IntrinsicMethInfosOfType directly with the arguments
AllMethInfosOfTypeInScope passed it, which also drops the NameEnv only the extension scan
needed. It is exported from the signature rather than substituting
InfoReader.GetIntrinsicMethInfosOfType, which does not apply ExcludeHiddenOfMethInfos.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev

@auduchinok,

Caution

No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

`* . (PR #XXXXX)`

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

Change path Release notes path Description
`src/Compiler` docs/release-notes/.FSharp.Compiler.Service/11.0.100.md No release notes found or release notes format is not correct

@github-actions github-actions Bot added the AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files label Sep 8, 2026

@T-Gro T-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Sep 9, 2026
@T-Gro
T-Gro self-requested a review September 9, 2026 09:22
@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-reviewed PR reviewed by AI review council AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants