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

Better location reporting for implementation / interface type declaration mismatch errors #4515

Closed
vicuna opened this issue Feb 29, 2008 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Feb 29, 2008

Original bug ID: 4515
Reporter: @dbuenzli
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2015-12-11T18:21:13Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.10.2
Category: ~DO NOT USE (was: OCaml general)

Bug description

For now we have :

The implementation src/per.ml does not match the interface src/per.cmi:
Type declarations do not match:
type error = string * string
is not included in
type error = string * string list

But I cannot use emacs's next error to jump there. With something like :

The implementation src/per.ml does not match the interface src/per.cmi:
Type declarations do not match:
File "src/per.ml", line 24, characters 13-27:
type error = string * string
is not included in
File "src/per.mli", line 56, characters 13-27:
type error = string * string list

I could.

Thanks,

Daniel

@vicuna
Copy link
Author

vicuna commented Jul 28, 2013

Comment author: @gasche

This was (partially) fixed in 4.00, which prints the following form of error message:

File "test.ml", line 1:
Error: The implementation test.ml does not match the interface test.cmi:
Values do not match: val y : int is not included in val y : bool
File "test.ml", line 2, characters 4-5: Actual declaration

While module/signature mismatches in the same file will report both the location of the actual and of the expected declaration, the location in the .mli file it not printed, because .cmi files do not preserve location (this is an intentional design choice of Jacques, commit 11229, but has been questioned by Alain in #5817).

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