You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7359 Reporter: sebmondet Assigned to:@garrigue Status: assigned (set by @xavierleroy on 2017-02-18T11:16:25Z) Resolution: open Priority: normal Severity: minor Target version: 4.06.0 +dev/beta1/beta2/rc1 Category: typing Monitored by:@hcarty
With 4.03.0, this seems partially fixed (?), at least in the same case we get an error but the error message still points at the wrong field:
$ File "mod_c.ml", line 5, characters 2-27:
Error: This expression has type Mod_a.product Lib_a.Mod_a.Container.t
It has no method product
Hint: Did you mean product?
(while the method that does not exist is path)
Not sure if this exhibits a deeper issue, or if it has been really fixed in 4.03.0.
The text was updated successfully, but these errors were encountered:
Concerning the error, it definitely complains that "(Lib_b.Mod_b.get_mod_a p)" has no (visible) method named "product". The #path is not even typechecked. So, there are two independent questions here:
Why is t that the "suggestion" code sees a method named "product" while the type-checker does not?
Is it the case that there is no visible method named "product" here?
@garrigue could you please have a quick look at this issue? We'll probably move it to 4.06 anyway.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Checking with trunk (before 4.12), the hint has disappeared. I don't know where it happened.
The error is still there, but it seems correct: the problem is the same module is used as packed for a value, and through the original cmi for a type. Since this type is structural, there is no error at this point. Later the type is no longer accessible, which makes it implicitly abstract, hence the error.
Original bug ID: 7359
Reporter: sebmondet
Assigned to: @garrigue
Status: assigned (set by @xavierleroy on 2017-02-18T11:16:25Z)
Resolution: open
Priority: normal
Severity: minor
Target version: 4.06.0 +dev/beta1/beta2/rc1
Category: typing
Monitored by: @hcarty
Bug description
This happened in big libraries and was difficult to spot (https://github.com/hammerlab/{ketrew,biokepi,epidisco}).
I have extracted the reproduction of the bug to 3 files that do not have dependencies:
https://gitlab.com/smondet/repro_ocaml_pack_problem
The reproduction there uses OCaml 4.02.3.
With 4.03.0, this seems partially fixed (?), at least in the same case we get an error but the error message still points at the wrong field:
$ File "mod_c.ml", line 5, characters 2-27:
Error: This expression has type Mod_a.product Lib_a.Mod_a.Container.t
It has no method product
Hint: Did you mean product?
(while the method that does not exist is
path
)Not sure if this exhibits a deeper issue, or if it has been really fixed in 4.03.0.
The text was updated successfully, but these errors were encountered: