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: 7318 Reporter: kosik Status: acknowledged (set by @damiendoligez on 2016-11-08T10:49:30Z) Resolution: open Priority: low Severity: feature Version: 4.03.0 Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Category: typing
Bug description
When I type:
moduleM1=structtypet = V0 | V1end(* M1 and M2 are equivalent *)moduleM2=structtypet = M1.t=V0 | V1end(* M1 and M3 are not equivalent *)moduleM3=structtypet = V0 | V1endmoduleM4=structtypet = {f0 : unit*unit*unit*M1.t*unit*unit*unit;f1 : unit*unit*unit*M1.t*unit*unit*unit}
end(* A failed attempt to define a module equivalent to M4 *)moduleM5=structtypet = M4.t= {f0 : unit*unit*unit*M2.t*unit*unit*unit;f1 : unit*unit*unit*M3.t*unit*unit*unit}
end
then the compiler (correctly) complains that:
Error: This variant or record definition does not match that of type M4.t
The types for field f1 are not equal.
The compiler marks the whole record definition.
Couldn't compiler mark the location of the particular field of the record whose type breaks the desired equality? (in this case "f1 : unit * unit * unit * M3.t * unit * unit * unit")
Or, even better, would it be possible to mark the location of the specific type-sub-term that breaks the equality? (in this case "M3.t")?
The text was updated successfully, but these errors were encountered:
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.
This has been improved significantly, here's the current error message:
Error: This variant or record definition does not match that of type M4.t
Fields do not match:
f1 : unit * unit * unit * M1.t * unit * unit * unit;
is not compatible with:
f1 : unit * unit * unit * M3.t * unit * unit * unit;
The types are not equal.
Original bug ID: 7318
Reporter: kosik
Status: acknowledged (set by @damiendoligez on 2016-11-08T10:49:30Z)
Resolution: open
Priority: low
Severity: feature
Version: 4.03.0
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: typing
Bug description
When I type:
then the compiler (correctly) complains that:
The compiler marks the whole record definition.
Couldn't compiler mark the location of the particular field of the record whose type breaks the desired equality? (in this case "
f1 : unit * unit * unit * M3.t * unit * unit * unit
")Or, even better, would it be possible to mark the location of the specific type-sub-term that breaks the equality? (in this case "
M3.t
")?The text was updated successfully, but these errors were encountered: