Skip to content

Comments

Checker: prevent reporting optional parameter rewritten tree symbols#19353

Open
auduchinok wants to merge 1 commit intodotnet:mainfrom
auduchinok:tc-optionalParam
Open

Checker: prevent reporting optional parameter rewritten tree symbols#19353
auduchinok wants to merge 1 commit intodotnet:mainfrom
auduchinok:tc-optionalParam

Conversation

@auduchinok
Copy link
Member

Fixes extra symbols reporting for optional parameters, like in the following:

type T =
    static member M(?a) = ()

The type checker generates an additional attribute, this PR makes its range synthetic, so it doesn't surface as if it was written explicitly.

@github-actions
Copy link
Contributor

❗ Release notes required

@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:

* <Informative description>. ([PR #XXXXX](https://github.com/dotnet/fsharp/pull/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.

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

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

@auduchinok
Copy link
Member Author

The added test assumes #19336 is fixed. There're currently two additional symbols are reported, and the recreated range is not synthetic anymore:

Screenshot 2026-02-23 at 16 42 23

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

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant