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

Nullness - generated ToString() members should override object and return string WithoutNull #17547

Conversation

T-Gro
Copy link
Member

@T-Gro T-Gro commented Aug 15, 2024

  • Overriding .ToString on an F# type will warn if it returns nullable string
  • Calling .ToString on F# types with generated ToString (powered by sprintfn %A under the hood) is typechecked as not returning null

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

github-actions bot commented Aug 15, 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.100.md

@T-Gro T-Gro marked this pull request as ready for review August 22, 2024 12:17
@T-Gro T-Gro requested a review from a team as a code owner August 22, 2024 12:17
Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pseudo method type is not my favourite, but it's easy to understand.

@T-Gro T-Gro merged commit 11cb682 into main Sep 3, 2024
30 checks passed
@T-Gro T-Gro deleted the 17531-nullness-issue-compiler-generated-member-overrides-should-change-nullness branch September 3, 2024 14:47
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 - Compiler-generated member overrides should change nullness
3 participants