Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004534OCamlOCaml generalpublic2008-04-12 22:432010-04-30 07:18
Reporterturpin 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.10.2 
Target VersionFixed in Version3.12.0+dev 
Summary0004534: Confusing error message
Descriptionfile delme.ml, no .mli:

module type T = sig
  val foo : unit
  val foo : unit
end


yields the following error message, which is meaningless and totally different from what we would get with modules:


The implementation delme.ml
does not match the interface (inferred signature):
Module type declarations do not match:
  module type T = sig val foo : unit val foo : int end
does not match
  module type T = sig val foo : unit val foo : int end
Modules do not match:
  sig val foo : unit val foo : int end
is not included in
  sig val foo : unit val foo : int end
Values do not match: val foo : int is not included in val foo : unit


If I put the module type inside a module, the message beomes:


The implementation delme.ml
does not match the interface (inferred signature):
Modules do not match:
  sig module type T = sig val foo : unit val foo : unit end end
is not included in
  sig module type T = sig val foo : unit val foo : unit end end
Module type declarations do not match:
  module type T = sig val foo : unit val foo : unit end
does not match
  module type T = sig val foo : unit val foo : unit end
Illegal permutation of structure fields
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004568)
doligez (administrator)
2008-08-04 17:06

Can't reproduce with 3.11+dev14 or 3.10.3+dev2: I get the second error message in both cases.

I'm filing this as a feature wish: we should refuse a module type that has duplicate field names, with a specific error message.
(0005425)
garrigue (manager)
2010-04-30 07:18

Fixed by release 10263 (only keep the last field with same name in module types).

- Issue History
Date Modified Username Field Change
2008-04-12 22:43 turpin New Issue
2008-08-04 17:06 doligez Note Added: 0004568
2008-08-04 17:06 doligez Severity minor => feature
2008-08-04 17:06 doligez Status new => acknowledged
2010-04-30 07:18 garrigue Note Added: 0005425
2010-04-30 07:18 garrigue Status acknowledged => closed
2010-04-30 07:18 garrigue Resolution open => fixed
2010-04-30 07:18 garrigue Fixed in Version => 3.12.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker