Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007070OCamltypingpublic2015-12-01 14:022017-07-27 22:43
Reporterlpw25 
Assigned Tolpw25 
PrioritylowSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionundecidedFixed in Version4.06.0+dev 
Summary0007070: Unexported values can cause non-generalisable variables error
DescriptionThe following .ml file:

  let r = ref []

  let r = 0

gives the error message:

  File "foo.ml", line 2, characters 8-14:
  Error: The type of this expression, '_a list ref,
         contains type variables that cannot be generalized

even though the offending value has been shadowed and so cannot cause any problems.

I think that `check_nongen_scheme` should probably be run on the simplified signature rather than the original signature.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0017399)
frisch (developer)
2017-02-22 17:00

Are there cases where the error you suggest to avoid is not actually related to a defect in the code (in your case, an unused declaration)?
(0017400)
frisch (developer)
2017-02-22 17:01

Not sure this qualifies as a bug, so downgrading to "feature".
(0017725)
lpw25 (developer)
2017-04-06 12:14

Pull request:

  https://github.com/ocaml/ocaml/pull/1139 [^]
(0018142)
octachron (developer)
2017-07-27 22:43

Fixed by merging the above PR.

- Issue History
Date Modified Username Field Change
2015-12-01 14:02 lpw25 New Issue
2016-02-03 17:09 doligez Priority normal => low
2016-02-03 17:09 doligez Status new => acknowledged
2016-02-03 17:09 doligez Target Version => 4.03.1+dev
2017-02-16 14:01 doligez Target Version 4.03.1+dev => undecided
2017-02-22 17:00 frisch Note Added: 0017399
2017-02-22 17:01 frisch Note Added: 0017400
2017-02-22 17:01 frisch Severity minor => feature
2017-02-23 16:45 doligez Category OCaml typing => typing
2017-04-06 12:14 lpw25 Note Added: 0017725
2017-07-27 22:43 octachron Note Added: 0018142
2017-07-27 22:43 octachron Status acknowledged => resolved
2017-07-27 22:43 octachron Fixed in Version => 4.06.0+dev
2017-07-27 22:43 octachron Resolution open => fixed
2017-07-27 22:43 octachron Assigned To => lpw25


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker