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

@T-Gro T-Gro commented Jan 23, 2025

Copy link
Copy Markdown
Member

Fixse #18232

Repro which does not warn, but should:

module Test

open System.IO
open System

// This is bad - input is nullable, output is not = must warn
let whatisThis (s:Stream|null) : IDisposable =
    s

@github-actions

github-actions Bot commented Jan 23, 2025

Copy link
Copy Markdown
Contributor

❗ 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.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 owner February 3, 2025 13:17
…sumption-in-function-return-values-can-bypass-nullness
@abonie abonie merged commit bacc160 into main Feb 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 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 - ((Type|null):Interface) subsumption in function return values can bypass nullness

3 participants