Skip to content

Commit

Permalink
derp
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermp committed Mar 27, 2020
1 parent cc2b0fd commit 8e5df0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fsharp/FSharp.Core/Nullable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ module Nullable =
[<CompiledName("ToInt")>]
let inline int (value:Nullable<_>) = if value.HasValue then Nullable(Operators.int value.Value) else Nullable()

[<CompiledName("ToUInt")>]
let inline uint (value: Nullable<_>) = if value.HasValue then Nullable(Operators.uint value.Value) else Nullable()

[<CompiledName("ToEnum")>]
let inline enum (value:Nullable< int32 >) = if value.HasValue then Nullable(Operators.enum value.Value) else Nullable()

Expand Down
8 changes: 8 additions & 0 deletions src/fsharp/FSharp.Core/Nullable.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ module Nullable =
[<CompiledName("ToInt")>]
val inline int : value:Nullable< ^T > -> Nullable<int> when ^T : (static member op_Explicit : ^T -> int) and default ^T : int

/// <summary>Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all
/// primitive numeric types. The operation requires an appropriate
/// static conversion method on the input type.</summary>
/// <param name="value">The input value.</param>
/// <returns>The converted unsigned integer</returns>
[<CompiledName("ToUInt")>]
val inline uint: value: Nullable< ^T > -> Nullable<uint> when ^T :(static member op_Explicit: ^T -> uint) and default ^T : uint

/// <summary>Converts the argument to a particular enum type.</summary>
/// <param name="value">The input value.</param>
/// <returns>The converted enum type.</returns>
Expand Down

0 comments on commit 8e5df0a

Please sign in to comment.