Skip to content

Visual F# Tools shows Option.toNullable is from another projects internal module #14678

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


Visual F# tools claims that Option.toNullable and Option.toNullable from other projects is from an internal module of a dependent project.

[]
module internal YoLo

module Option =

    let ofNullable nullable : 'a option =
        match box nullable with
        | null -> None // CLR null
        | :? Nullable as n when not n.HasValue -> None // CLR struct
        | :? Nullable as n when n.HasValue -> Some(n.Value) // CLR struct
        | x when x.Equals(DBNull.Value) -> None // useful when reading from the db into F#
        | x -> Some(unbox x) // anything else

    let toNullable =
        function
        | Some item -> new Nullable(item)
        | None -> new Nullable()

Original Comments

Feedback Bot on 1/24/2023, 08:39 AM:

(private comment, text removed)

Cameron Taggart [MSFT] on 1/24/2023, 03:56 PM:

(private comment, text removed)


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.Needs-Repro

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions