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

Incorrect error message #6931

Closed
vicuna opened this issue Jul 17, 2015 · 2 comments
Closed

Incorrect error message #6931

vicuna opened this issue Jul 17, 2015 · 2 comments
Assignees
Milestone

Comments

@vicuna
Copy link

@vicuna vicuna commented Jul 17, 2015

Original bug ID: 6931
Reporter: @lpw25
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-02-16T14:14:57Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.2
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Monitored by: @gasche

Bug description

The following code:

type foo = Foo

type bar = { x : foo; y : int }

let b = { x = Fod; y = 5 }

generates the error message:

Characters 14-17:
let b = { x = Fod; y = 5 };;
^^^
Error: This record expression is expected to have type bar
The constructor Fod does not belong to type foo
Hint: Did you mean Foo?

but it should instead be:

Characters 14-17:
let b = { x = Fod; y = 5 };;
^^^
Error: This expression is expected to have type foo
The constructor Fod does not belong to type foo
Hint: Did you mean Foo?

@vicuna
Copy link
Author

@vicuna vicuna commented Jul 22, 2015

Comment author: @damiendoligez

I have committed a fix to trunk (rev 16235). To be reviewed by @gasche before closing this PR.

@vicuna
Copy link
Author

@vicuna vicuna commented Sep 9, 2015

Comment author: @garrigue

Fixed by doligez at revision 16235.

@vicuna vicuna closed this as completed Feb 16, 2017
@vicuna vicuna added the typing label Mar 14, 2019
@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants