Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: warn when inherit does not produce a subtype #3408

Closed
vicuna opened this issue Jun 26, 2002 · 1 comment
Closed

feature: warn when inherit does not produce a subtype #3408

vicuna opened this issue Jun 26, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jun 26, 2002

Original bug ID: 1216
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: typing

Bug description

Full_Name: james woodyatt
Version: 3.04
OS: Mac OS X 10.1.5
Submission from: 17.255.97.138 (17.255.97.138)

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.

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant