Skip to content

Bugfix: Warn when upcast drops nullness via FindUniqueFeasibleSupertype - #18261

Merged
abonie merged 4 commits into
mainfrom
18232-nullness-issue---typenullinterface-subsumption-in-function-return-values-can-bypass-nullness
Feb 4, 2025
Merged

Bugfix: Warn when upcast drops nullness via FindUniqueFeasibleSupertype#18261
abonie merged 4 commits into
mainfrom
18232-nullness-issue---typenullinterface-subsumption-in-function-return-values-can-bypass-nullness

Conversation

@T-Gro

Copy link
Copy Markdown
Member

Fixse #18232

Repro which does not warn, but should:

moduleTestopenSystem.IOopenSystem// This is bad - input is nullable, output is not = must warnletwhatisThis(s:Stream|null):IDisposable =
s

@github-actions

github-actionsBot commented Jan 23, 2025

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.300.md

@T-Gro
T-Gro marked this pull request as ready for review February 3, 2025 13:17
@T-Gro
T-Gro requested a review from a team as a code ownerFebruary 3, 2025 13:17
…sumption-in-function-return-values-can-bypass-nullness
0101
0101 approved these changes Feb 3, 2025
@abonie
abonie merged commit bacc160 into mainFeb 4, 2025
@T-Gro
T-Gro deleted the 18232-nullness-issue---typenullinterface-subsumption-in-function-return-values-can-bypass-nullness branch February 4, 2025 13:03
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.

Nullness issue - ((Type|null):Interface) subsumption in function return values can bypass nullness

3 participants

@T-Gro@0101@abonie