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
Closed

Exhaustiveness check wrong for class constructor arguments #6862

vicuna opened this issue May 9, 2015 · 1 comment
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna 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
Copy link
Author

vicuna commented May 9, 2015

Comment author: @garrigue

Fixed in 4.02 and trunk at revisions 16101 and 16102.

@vicuna vicuna closed this as completed 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
Projects
None yet
Development

No branches or pull requests

2 participants