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
$ 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"...)
The text was updated successfully, but these errors were encountered:
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.