File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,11 @@ type Length =
425425 static member Length ( x : 'T list , [<Optional>] _impl : Length ) = List.length x
426426 static member Length ( x : option < 'T > , [<Optional>] _impl : Length ) = if x.IsSome then 1 else 0
427427 static member Length ( x : voption < 'T > , [<Optional>] _impl : Length ) = if x.IsSome then 1 else 0
428+ #if ! NET45
428429 static member Length ( x : Result < _ , _ > , [<Optional>] _impl : Length ) = if Result.isOk x then 1 else 0
430+ #else
431+ static member Length ( x : Result < _ , _ > , [<Optional>] _impl : Length ) = match x with | Ok _ -> 1 | _ -> 0
432+ #endif
429433 static member Length ( x : 'T [] , [<Optional>] _impl : Length ) = Array.length x
430434 [<Obsolete; CompiledName( " Length" ) >]
431435 static member LengthLegacy ( x : seq < 'T > , [<Optional>] _impl : Length ) = Seq.length x
You can’t perform that action at this time.
0 commit comments