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

Exceptions raised by type checker #5907

vicuna opened this Issue Jan 25, 2013 · 1 comment


None yet
2 participants
Copy link

vicuna commented Jan 25, 2013

Original bug ID: 5907
Reporter: pzimmer
Assigned to: @garrigue
Status: closed (set by @garrigue on 2013-01-26T01:48:02Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 4.00.1
Fixed in version: 4.00.2+dev
Category: typing
Monitored by: @gasche pzimmer

Bug description

Unification involving a type declared as "type 'a t = 'a" generate exceptions instead of legitimate type errors:

    OCaml version 4.00.1

type 'a t = 'a;;

type 'a t = 'a

let f (g : 'a list -> 'a t -> 'a) s = g s s;;

Fatal error: exception Ctype.Unify(_)

let f (g : 'a * 'b -> 'a t -> 'a) s = g s s;;

Fatal error: exception Stack_overflow


This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jan 26, 2013

Comment author: @garrigue

Fixed in trunk and 4.00, at revisions 13280 and 13281.

The call to the occur check in Ctype.unify3 was wrong.
Hard to believe this was not detected earlier...
Thank you very much for strengthening our so weak test suite.

@vicuna vicuna closed this Jan 26, 2013

@vicuna vicuna added the typing label 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.