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

Exhaustiveness check wrong for class constructor arguments #6862

Closed
vicuna opened this issue May 9, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented May 9, 2015

Original bug ID: 6862
Reporter: @garrigue
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:49:18Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.1
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: typing

Bug description

The following code causes no warning:

type _ opt = Just : 'a -> 'a opt | Nothing : 'a opt
class d (Just x) = object method x : int = x end;;

This is bad, because actually the next expression causes a segmentation fault...

new d Nothing;;

@vicuna

This comment has been minimized.

Copy link
Author

commented May 9, 2015

Comment author: @garrigue

Fixed in 4.02 and trunk at revisions 16101 and 16102.

@vicuna vicuna closed this Dec 7, 2016

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added this to the 4.02.2 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.