Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006004OCamlOCaml typingpublic2013-05-03 09:242013-05-04 03:45
Reporterfrisch 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.01.0+dev 
Summary0006004: Type information does not flow to "inherit" parameters
DescriptionIf we compile the following with -principal:

======================================================================
type t = A
type s = A

class f (_ : t) = object end

let _ = new f A (* ok *)

class g = object
  inherit f A (* -> this type-based constructor disambiguation is not principal. *)
end
======================================================================

we get a warning 18, but only on the second occurrence of "f A". Is it normal?
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0009242)
frisch (developer)
2013-05-03 09:26

Actually, this has nothing to do with the "inherit", since:

class g = f A

is also consider as non-principal.
(0009245)
garrigue (manager)
2013-05-03 17:16

Indeed, the code for Pcl_apply doesn't generalize the type before calling type_argument.
This shouldn't be hard to do.
(0009246)
garrigue (manager)
2013-05-04 03:45

Fixed in trunk, commit 13649.

- Issue History
Date Modified Username Field Change
2013-05-03 09:24 frisch New Issue
2013-05-03 09:26 frisch Note Added: 0009242
2013-05-03 17:16 garrigue Note Added: 0009245
2013-05-03 17:16 garrigue Assigned To => garrigue
2013-05-03 17:16 garrigue Status new => confirmed
2013-05-04 03:45 garrigue Note Added: 0009246
2013-05-04 03:45 garrigue Status confirmed => resolved
2013-05-04 03:45 garrigue Fixed in Version => 4.01.0+dev
2013-05-04 03:45 garrigue Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker