Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001216OCamltypingpublic2002-06-26 20:242016-12-07 18:12
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001216: feature: warn when inherit does not produce a subtype
DescriptionFull_Name: james woodyatt
Version: 3.04
OS: Mac OS X 10.1.5
Submission from: (

Consider the following two class types:

    class type mule = object('a) method m: 'a -> 'a end
    class type unicorn = object inherit mule method n: unit end

Since mule has a method where the object type is in a contra-variant
position, unicorn adds a method that isn't private, this means that
unicorn is not a subtype of mule.

I'd like to see the compiler generate a warning when this happens.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2016-12-07 18:12 shinwell Category OCaml general => OCaml typing
2016-12-07 18:12 shinwell Description Updated View Revisions
2017-02-23 16:45 doligez Category OCaml typing => typing

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker