diff --git a/src/FSharp.Core/option.fs b/src/FSharp.Core/option.fs index ba8256580ec..1b29141df64 100644 --- a/src/FSharp.Core/option.fs +++ b/src/FSharp.Core/option.fs @@ -148,7 +148,7 @@ module Option = [] let inline ofNullable (value: System.Nullable<'T>) = if value.HasValue then - Some value.Value + Some (value.GetValueOrDefault()) else None @@ -338,7 +338,7 @@ module ValueOption = [] let inline ofNullable (value: System.Nullable<'T>) = if value.HasValue then - ValueSome value.Value + ValueSome (value.GetValueOrDefault()) else ValueNone