Skip to content

Commit 998d9c2

Browse files
committed
Remove unintentional type unification
1 parent 4b0d8ec commit 998d9c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/FSharpPlus/Control/Comonad.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ type Extract =
3636
let inline call_2 (_mthd: ^M, x: ^I) = ((^M or ^I) : (static member Extract : _ -> _) x)
3737
call_2 (Unchecked.defaultof<Extract>, x)
3838

39+
#nowarn "0025" // (see nowarn comment below)
40+
3941
type Extend =
4042
static member (=>>) (g: Async<'T> , f: Async<'T> -> 'U) = async.Return (f g) : Async<'U>
4143
static member (=>>) (g: Lazy<'T> , f: Lazy<'T> -> 'U ) = Lazy<_>.Create (fun () -> f g) : Lazy<'U>
@@ -77,7 +79,7 @@ type Extend =
7779
match g with
7880
| ValueTask.Faulted e -> tcs.SetException e
7981
| ValueTask.Canceled -> tcs.SetCanceled ()
80-
| ValueTask.Succeeded -> raise Internals.Errors.exnUnreachable
82+
// nowarn here, this case has been handled already if g.IsCompleted
8183
else
8284
ValueTask.continueTask tcs g (fun _ ->
8385
try tcs.SetResult (f g)

0 commit comments

Comments
 (0)