Wrong type is reported in type mismatch error
Fixes #13192 .
@edgarfgp thanks for looking into this!
Would you mind adding "negtests" similar to those defined in this file https://github.com/dotnet/fsharp/blob/4be3bb5760e87ac522cd449c317016323f415467/tests/fsharp/tests.fs#L3374-L3405
Those test make sure the type checker error match desired output (that is error message with correct type mismatch info).
Unfortunately I do not have the enough knowledge regarding error recovering to fix It is 50 % done IMO . Would be awesome if someone can take this one and finished it. I think would be a good improvement to have :) . Thanks @smoothdeveloper and @auduchinok for the pointers though .
Gave this another go with @dsyme and I think it's now ready :)
@0101 This looks really good :) . Any thing pending to be ready for merge ?
@edgarfgp I'd like to get @dsyme's review :) Or at minimum some other reviews...
Really good work!!! And so glad to see us making these core improvements
@edgarfgp @0101 Yay! 🥳 🥳 🥳
Thanks for making this happen . I have learn so much my reviewing this code :)
@edgarfgp @dsyme optional continuation here: https://github.com/dotnet/fsharp/pull/14003 🙂