Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unions with 4 or more cases silently fail to utilize UseNullAsTrueValue. #711

Open
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
@bryanedds

Description

@bryanedds

Repro. case in F# 4.4.0.0 -

[<CompilationRepresentation (CompilationRepresentationFlags.UseNullAsTrueValue)>]type T = A | B of int | C of int | D of int;;A;;

In F# interactive, here you'll see that A is a proper value, which is not desired.

[<CompilationRepresentation (CompilationRepresentationFlags.UseNullAsTrueValue)>]type T = A | B of int | C of int;;A;;

In F# interactive, here you'll see that A is a null, which is desired.

Would be a nice optimization to have this work for 4 cases as here -https://github.com/bryanedds/Prime/blob/master/Prime/Prime/Prime/Vmap.fs#L25-L30

NOTE: Issue moved from here -fsharp/fsharp#510

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp