Skip to content

Do not throw from IsUnionCaseTester and handle a case where symbol is not considered a method/property - #17634

Merged
KevinRansom merged 7 commits into
dotnet:mainfrom
abonie:isunioncasetester_throws
Aug 30, 2024
Merged

Do not throw from IsUnionCaseTester and handle a case where symbol is not considered a method/property#17634
KevinRansom merged 7 commits into
dotnet:mainfrom
abonie:isunioncasetester_throws

Conversation

@abonie

@abonieabonie commented Aug 29, 2024

Copy link
Copy Markdown
Member

Description

Fixes#17301

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/release-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

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

@github-actions

github-actionsBot commented Aug 29, 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.100.md

@abonieabonie changed the title [WIP] Isunioncasetester throws[WIP] Do not throw from IsUnionCaseTester and handle a case where symbol is not considered a method/propertyAug 29, 2024
Seems like methods/properties that are generated in IL, like `get_Is*`
in this case, have `IsMethod` (or `IsProperty`) false for some reason,
even when `IsPropertyGetterMethod` is true. This would result in
`IsUnionCaseTester` giving incorrect answers. This fixes that at
`IsUnionCaseTester`, though it might be worth it to see if it can be
fixed at the root of the issue
@abonie
abonieforce-pushed the isunioncasetester_throws branch from 47ed0e3 to 06a62dfCompareAugust 29, 2024 16:49
@abonieabonie changed the title [WIP] Do not throw from IsUnionCaseTester and handle a case where symbol is not considered a method/propertyDo not throw from IsUnionCaseTester and handle a case where symbol is not considered a method/propertyAug 30, 2024
@abonie
abonie marked this pull request as ready for review August 30, 2024 11:27
@abonie
abonie requested a review from a team as a code ownerAugust 30, 2024 11:27
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.

IsUnionCaseTester throwing an error

4 participants

@abonie@KevinRansom@T-Gro@vzarytovskii