When implementing interfaces, cancellable tasks can produce errors in the wrong places
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
**Repro steps**
Consider this code:
```fsharp
type ITest =
abstract member DoStuff: unit -> CancellableTask
type Test() =
interface ITest with
member _.DoStuff() =
cancellableTask {
let _test1 = "blah"
let! _test2 = CancellableTask.getCurrentCancellationToken()
return "blah"
}
```
**Expected behavior**
I would imagine the code producing an error either around the `cancellableTask` definition or around the last line of the CE.
Provide a description of the expected behavior.
**Actual behavior**
Actually the code produces an error at the first bang binding.

**Known workarounds**
None, just figuring out what's going on and fixing the error.
**Related information**
The error span seems reasonable when interfaces are not in the game:

Contributor guide
Assessment
This issue has not been assessed yet.