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

Unbound variable after pattern with gadt #5490

Closed
vicuna opened this issue Jan 20, 2012 · 1 comment
Closed

Unbound variable after pattern with gadt #5490

vicuna opened this issue Jan 20, 2012 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 20, 2012

Original bug ID: 5490
Reporter: @diml
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2013-08-31T10:46:04Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: mehdi

Bug description

The following code produce an error with trunk:

type t = A : t

let f () =
let A = A in
let x = 0 in
x

File "toto.ml", line 4, characters 2-33:
Error: Unbound value x

I did a git bisect and the bug appears at commit 12050.

@vicuna
Copy link
Author

vicuna commented Jan 20, 2012

Comment author: @alainfrisch

Fixed in rev 12059.

The code was probably buggy before the commit you mention, because the analysis of free identifiers in Unused_var was incomplete (but now it is more incomplete, so the error was simpler to trigger).

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

No branches or pull requests

2 participants