Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007811OCamllexing and parsingpublic2018-06-23 05:132018-06-23 11:04
Reporterwhitequark 
Assigned Togasche 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.06.1 
Target VersionFixed in Version4.08.0+dev 
Summary0007811: "Unbound value" hint could be more useful on missing rec
DescriptionTry to compile e.g.

let add_type x = ()
let find_type x =
  (* ... *) find_type x

This fails with:

Error: Unbound value find_type
Hint: Did you mean add_type?

It ought to say something like:

Error: Unbound value find_type
Hint: Did you mean to make find_type recursive?
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0019207)
gasche (administrator)
2018-06-23 10:30

This was implemented in trunk (not 4.07) by Armaël Guéneau:

# let add_type x = ();;
val add_type : 'a -> unit = <fun>
# let find_type x = (* ... *) find_type x;;
                              ^^^^^^^^^
Error: Unbound value find_type
Hint: Did you mean add_type?
Hint: If this is a recursive definition,
you should add the 'rec' keyword on line 1
(0019208)
whitequark (developer)
2018-06-23 11:04

Nice!

- Issue History
Date Modified Username Field Change
2018-06-23 05:13 whitequark New Issue
2018-06-23 10:30 gasche Note Added: 0019207
2018-06-23 10:30 gasche Status new => resolved
2018-06-23 10:30 gasche Fixed in Version => 4.08.0+dev
2018-06-23 10:30 gasche Resolution open => fixed
2018-06-23 10:30 gasche Assigned To => gasche
2018-06-23 11:04 whitequark Note Added: 0019208


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker