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

Support Unchecked.nonNull for F# 9 #3991

Closed
OnurGumus opened this issue Dec 31, 2024 · 1 comment · Fixed by #4070
Closed

Support Unchecked.nonNull for F# 9 #3991

OnurGumus opened this issue Dec 31, 2024 · 1 comment · Fixed by #4070

Comments

@OnurGumus
Copy link

Description

F# 9 provides Unchecked.nonNull to supress the nullness check essentially it is a no op or rather acts like an id function.
It would be great if it is supported.

Repro code

let x = ((obj()).ToString() |> Unchecked.nonNull).ToUpperInvariant()

Expected and actual results

Currently it fails with
error FABLE: Microsoft.FSharp.Core.Operators.Unchecked.NonNull (static) is not supported by Fable

Related information

The API is documented at https://devblogs.microsoft.com/dotnet/nullable-reference-types-in-fsharp-9/#flow-analysis

  • Fable version: 5.0.0-alpha.3
  • Operating system: Any
@laurentpayot
Copy link

Somewhat related to #3887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants