Skip to content

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

Open
auduchinok wants to merge 2 commits into
dotnet:mainfrom
auduchinok:nameres-iwsamIntrinsicOnly-main
Open

Name resolution: CheckIWSAM only needs the intrinsic methods#20490
auduchinok wants to merge 2 commits 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


✅ Found changes and release notes in following paths:

Change path Release notes path Description
`src/Compiler` docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

@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
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen ⚠️ Affects-Bootstrap Tooling check: PR touches compiler bootstrap chain labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Bootstrap, Affects-Compiler-Output
Affects-Bootstrap: Changes compiler name-resolution code used during bootstrap.
Affects-Compiler-Output: Changes compiler method discovery and emitted behavior.

Generated by PR Tooling Safety Check · gpt56 595.2K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-Bootstrap Tooling check: PR touches compiler bootstrap chain ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen 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