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
{{ message }}
Repository navigation
Source location gets lost when a type mismatch happens on computation expression #19550
When a type constraint mismatch error happens on a computation expression under certain circumstances, type checker reports "unknown(1, 1)" instead of the desired source location.
Repro steps
Define a computation builder with a Zero method, and apply it in a pipeline with wrong arguments:
typeFooBuilder()=member_.Zero()=fun x -> x +42letfoo= FooBuilder()""|> foo {}|> printfn "%d"
The compiler reports .../unknown(1, 1) regardless of where the mismatch actually happens. LSP diagnostic get lost as well:
This applies to other operations beyond forward pipe |>.
Expected behavior
The compiler should be able to report correct source location.
Activity
Add PR link to release notes entry for #19550
Fix lost source range for empty-bodied computation expressions in pip…