Skip to content

Bugfix: Warn when upcast drops nullness via FindUniqueFeasibleSupertype #18261

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

Conversation

T-Gro
Copy link
Member

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

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

Copy link
Contributor

github-actions bot commented Jan 23, 2025

❗ 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
33 checks passed
@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