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

-short-paths and signature inclusion errors #6566

Closed
vicuna opened this issue Sep 17, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Sep 17, 2014

Original bug ID: 6566
Reporter: @mshinwell
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:34:46Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.1+dev
Fixed in version: 4.02.1+dev
Category: typing

Bug description

$ cat x.mli
type t = string
$ cat x.ml
type t = int

$ ocamlopt -c x.mli
$ ocamlopt -c -short-paths x.ml
File "x.ml", line 1:
Error: The implementation x.ml does not match the interface x.cmi:
Type declarations do not match:
type t = t
is not included in
type t = bytes
File "x.ml", line 1, characters 5-12: Actual declaration

The "type t = t" seems wrong.

(Let's ignore that it says "bytes" rather than "string"...)

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 17, 2014

Comment author: @garrigue

Fixed in 4.02 at revision 15246.

The fix is a bit hacky: we export an older environment inside the error, so that local definitions are not used for looking up short paths inside type, class type, and class definitions.
Not sure where it could be done otherwise.

@vicuna vicuna closed this Dec 7, 2016

@vicuna vicuna added the typing label 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
You can’t perform that action at this time.