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

exception with object yields incorrect type #4481

vicuna opened this Issue Jan 18, 2008 · 1 comment


None yet
1 participant
Copy link

vicuna commented Jan 18, 2008

Original bug ID: 4481
Reporter: hirokawa
Status: closed (set by @garrigue on 2008-01-18T03:48:37Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.1
Fixed in version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4817
Monitored by: hirokawa

Bug description

When catching an exception whose argument is an
object of type < .. >, ocaml infers a wrong type.
Here is a short example:

exception A of < .. >;;

exception A of < .. >

try raise (A (object method x = 1 end)) with A o -> o#x;;

  • : 'a =

The type of the last expression should be int.


This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jan 18, 2008

Comment author: @garrigue

This is the 3rd avatar of type variables going unchecked in exceptions...
Actually, the exception definition itself shall be rejected.
Thanks for reporting it, this is now fixed in CVS.

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.