Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing message with type error (FS0001) #17516

Merged

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented Aug 9, 2024

Description

let foo items =
    for (a,b,c) in items do
        printfn "%A" (a, c)

[<EntryPoint>]
let main args =
    foo ({1..10} |> Seq.pairwise) // Failed miserably  with error number FS0001 but not actual error message 
    0

Before

  • (Error 1, Line 8, Col 21, Line 8, Col 33, "")

After

  • (Error 1, Line 8, Col 21, Line 8, Col 33, "The tuples have differing lengths of 3 and 2")

Fixes #17373

Checklist

  • Test cases added
  • Release notes entry updated

Copy link
Contributor

github-actions bot commented Aug 9, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/9.0.100.md

@edgarfgp edgarfgp marked this pull request as ready for review August 10, 2024 16:20
@edgarfgp edgarfgp requested a review from a team as a code owner August 10, 2024 16:20
@majocha
Copy link
Contributor

majocha commented Aug 10, 2024

Would be nice to indicate which length is expected.

Comment on lines +832 to +833
if m1.StartLine <> m2.StartLine then
os.AppendString(SeeAlsoE().Format(stringOfRange m1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edgarfgp Could you add some cases covering this check, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Missing message with type error (FS0001)
4 participants