Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005618OCamlOCaml generalpublic2012-05-17 22:182012-05-28 13:55
Reportercfalls 
Assigned Tofrisch 
PrioritylowSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.01.0+dev 
Summary0005618: enrich "not a function" compile error with type information
DescriptionWhen there's a type error, and in particular I'm trying to use a non-function as a function, I wish the error message would include the specific types involved instead of just saying "not a function".
Steps To Reproduce# let x = 3;;
val x : int = 3
# List.map x [];;
Error: This expression has type int but an expression was expected of type
         'a -> 'b
# x 5;;
Error: This expression is not a function; it cannot be applied
Additional InformationI'd like "x 5" above to produce an error more like "This expression is not a function and so cannot be applied. In particular, it has type int but an expression was expected of type int -> 'a".

I mention this mostly because there's a chance it's very easy to implement.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007467)
frisch (developer)
2012-05-28 13:55

Fixed in trunk (commit #12489).

- Issue History
Date Modified Username Field Change
2012-05-17 22:18 cfalls New Issue
2012-05-28 13:55 frisch Note Added: 0007467
2012-05-28 13:55 frisch Status new => resolved
2012-05-28 13:55 frisch Fixed in Version => 4.01.0+dev
2012-05-28 13:55 frisch Resolution open => fixed
2012-05-28 13:55 frisch Assigned To => frisch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker