Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing nullness warning in case of multiple applicable candidates for method resolution (e.g. string and ROS<char>) #17918

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Oct 24, 2024

Fixes #17880 .

This was happening when method resolution had more than 1 correct candidate, e.g. 1 direct and 1 via op_Implicit.

The condition to avoid warning in case of speculative overloads was originally there to avoid duplicate warnings, but this has since been eliminated by a change in type inference for arguments.
There is an existing test for duplicate message which is still passing (not visible in the PR diff, because the tests did not have to be changed).

The same for speculativeMethodOVerloading special case for uselessWarning feature - all existing tests are passing as before with exactly the same diagnostics set.

@T-Gro T-Gro linked an issue Oct 24, 2024 that may be closed by this pull request
7 tasks
Copy link
Contributor

github-actions bot commented Oct 24, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

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

@T-Gro T-Gro self-assigned this Oct 24, 2024
@T-Gro T-Gro added this to the October-2024 milestone Oct 24, 2024
@T-Gro T-Gro marked this pull request as ready for review October 24, 2024 15:31
@T-Gro T-Gro requested a review from a team as a code owner October 24, 2024 15:31
@abonie abonie merged commit aef7b93 into main Nov 7, 2024
32 checks passed
@T-Gro T-Gro deleted the 17880-nullness-issue---static-methods-on-struct-do-not-report-nullness-warning branch November 11, 2024 10:57
Sign up for free to 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.

Nullness issue - static methods on struct do not report nullness warning
3 participants