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

Bad error message for non-exhaustive matching on extensible types #6420

Closed
vicuna opened this issue May 13, 2014 · 2 comments
Closed

Bad error message for non-exhaustive matching on extensible types #6420

vicuna opened this issue May 13, 2014 · 2 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented May 13, 2014

Original bug ID: 6420
Reporter: @alainfrisch
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:26:58Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.02.0+dev
Fixed in version: 4.02.0+dev
Category: typing

Bug description

type t = ..
type t += A of int

let f = function
  | A x -> x

gives the following warning:

Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
A

The example is precisely one of the values being matched (well, modulo the missing argument in the warning text).

File attachments

@vicuna
Copy link
Author

vicuna commented May 13, 2014

Comment author: @lpw25

I forgot to account for the changes to parmatch.ml from #6384. The attached patch fixes it.

Could someone please merge this for me?

@vicuna
Copy link
Author

vicuna commented May 14, 2014

Comment author: @garrigue

Applied patch in trunk and 4.02, at revisions 14859 and 14860.

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the typing label Mar 14, 2019
@vicuna vicuna added this to the 4.02.0 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