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: 5037 Reporter: kaustuv Status: closed (set by @garrigue on 2010-04-28T05:04:18Z) Resolution: fixed Priority: normal Severity: major Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general) Related to:#6252#4487#4974#5061 Monitored by: "Julien Signoles" @hcarty
Bug description
module type S = module type of (struct
let x = 42
let x = "abc"
end) ;;
module type S = sig val x : int val x : string end
module T : S = struct let x = "abc" end ;;
Characters 15-39:
module T : S = struct let x = "abc" end ;;
^^^^^^^^^^^^^^^^^^^^^^^^
Error: Signature mismatch:
Modules do not match: sig val x : string end is not included in S
Values do not match: val x : string is not included in val x : int
These don't work either:
module T : S = struct let x = 42 end ;;
module T : S = struct let x = 42 let x = "abc" end ;;
Since repeated module level definitions with the same name are very common, "module type of" should use the same heuristic as "sig ... end" and retain only the last one of repeated definitions.
Original bug ID: 5037
Reporter: kaustuv
Status: closed (set by @garrigue on 2010-04-28T05:04:18Z)
Resolution: fixed
Priority: normal
Severity: major
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #6252 #4487 #4974 #5061
Monitored by: "Julien Signoles" @hcarty
Bug description
module type S = module type of (struct
module type S = sig val x : int val x : string end
module T : S = struct let x = "abc" end ;;
Characters 15-39:
module T : S = struct let x = "abc" end ;;
^^^^^^^^^^^^^^^^^^^^^^^^
Error: Signature mismatch:
Modules do not match: sig val x : string end is not included in S
Values do not match: val x : string is not included in val x : int
These don't work either:
module T : S = struct let x = 42 end ;;
module T : S = struct let x = 42 let x = "abc" end ;;
Since repeated module level definitions with the same name are very common, "module type of" should use the same heuristic as "sig ... end" and retain only the last one of repeated definitions.
File attachments
The text was updated successfully, but these errors were encountered: