ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

do! on partially applied function shows no error in Ionide

Open tforkmann opened this issue 6 months ago • 0 comments

Describe the bug

Ionide doesn’t show any warning or diagnostic when using do! with a partially applied function that is missing required parameters. The expression type-checks as a function (not a Task or Async), but the IDE still allows it silently, even though the F# compiler raises an FS0041 error at build time.

Steps to reproduce

task {
    do! JobsStorage.createFinishContractJob contract.ContractID (Some deadline)
}

with 
val createFinishContractJob :
    contractID: ContractID ->
    deadline: option<DateTimeOffset> ->
    createdByUser: option<string> ->
    Task<unit>

Expected

task {
    do! JobsStorage.createFinishContractJob contract.ContractID (Some deadline) None
}

No warning or squiggle is shown. Ionide’s type checker accepts the code silently until dotnet build, which fails with:

error FS0041: No overload for method 'Bind' matches ...

Link to sample reproduction

Expected behaviour

Ionide should highlight or hint that parameters are missing — e.g. show a squiggle or tooltip such as: 'do!' expects an awaitable expression (Task/Async), but this is a function missing arguments.

It works for let! _ =

Screenshots

Image Image

Machine infos

  • OS: Mac
  • .NET SDK version: 9.0.305
  • Ionide version: latest

tforkmann avatar Oct 16 '25 11:10 tforkmann