You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a succinct description of the issue.
Repro steps
openSystem.Threading.TasksletmyFunction(f,i)=task{do! f ""return()}[<EntryPoint>]letmain argv =letmyTuple=(fun s -> Task.FromResult()),1(myFunction myTuple).Wait()0
Expected behavior
The programs runs to end successfully. This code worked with Fsharp 5.0.1 and TaskBuilder.fs
Actual behavior
With Fsharp.Core 6.0 it fails in runtime with error
Unhandled exception. System.InvalidCastException: Unable to cast object of type 'System.Tuple`2[Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Threading.Tasks.Task`1[Microsoft.FSharp.Core.Unit]],System.Int32]' to type 'S
ystem.Tuple`2[Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Threading.Tasks.Task`1[Microsoft.FSharp.Core.Unit]],System.Object]'.
Known workarounds
It works when f or i parameter has type annotation
Related information
Provide any related information (optional):
Windows 10
Microsoft (R) Build Engine version 17.0.0-preview-21460-01+8f208e609 for .NET