Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004716OCamlOCaml generalpublic2009-02-12 16:432010-04-30 09:12
ReporterYoric 
Assigned Togarrigue 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.12.0+dev 
Summary0004716: Improve error message "This expression has type foo but is used with type foo"
DescriptionBeginners are often baffled by error message "This expression has type foo but is used with type foo", due to having two types with the same name in the toplevel.

I suggest that, whenever the toplevel is instructed to print an error messages that that two types are incompatible, it first checks whether the pretty-printed types are identical, in which case it rather prints a message along the lines of
"This expression has type foo but is used with type foo. This strange error message is due to the fact that you have define two types with the same name and are attempting to use a value corresponding to one definition as if it belonged to the other definition."

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0005429)
garrigue (manager)
2010-04-30 09:12

Use unique names (with internal number) when reporting a type error involving conflicting
identifiers with same name.
(at revision 10333)

- Issue History
Date Modified Username Field Change
2009-02-12 16:43 Yoric New Issue
2009-04-29 15:37 doligez Status new => acknowledged
2010-04-30 07:16 garrigue Status acknowledged => assigned
2010-04-30 07:16 garrigue Assigned To => garrigue
2010-04-30 09:12 garrigue Note Added: 0005429
2010-04-30 09:12 garrigue Status assigned => closed
2010-04-30 09:12 garrigue Resolution open => fixed
2010-04-30 09:12 garrigue Fixed in Version => 3.12.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker