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

Integer literal hints leak dummy locations #8953

Closed
Armael opened this issue Sep 19, 2019 · 0 comments
Closed

Integer literal hints leak dummy locations #8953

Armael opened this issue Sep 19, 2019 · 0 comments

Comments

@Armael
Copy link
Member

@Armael Armael commented Sep 19, 2019

In the toplevel:

# let f x = (match x with
      | None -> 0
      | Some _ -> 1) +. 1.;;
Error: This expression has type int but an expression was expected of type
         float
File "_none_", line 1:   Hint: Did you mean `0.'?

This seems to only happen in the toplevel in non-dumb mode. Both in batch mode and with TERM=dumb, we get the expected:

# let f x = (match x with
      | None -> 0
      | Some _ -> 1) +. 1.;;    
Line 2, characters 16-17:
2 |       | None -> 0
                    ^
Error: This expression has type int but an expression was expected of type
         float
  Hint: Did you mean `0.'?

cc @gasche

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.