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

Uncaught exception with wrong type for "%ignore" #6946

Closed
vicuna opened this issue Jul 31, 2015 · 2 comments
Closed

Uncaught exception with wrong type for "%ignore" #6946

vicuna opened this issue Jul 31, 2015 · 2 comments
Assignees

Comments

@vicuna
Copy link

@vicuna vicuna commented Jul 31, 2015

Original bug ID: 6946
Reporter: @lpw25
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-02-16T14:16:24Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 4.02.2
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Monitored by: @gasche @diml

Bug description

Due to the unguarded use of filter_arrow in type_application, an uncaught exception can be raised by the type-checker:

external foo : int = "%ignore";;

external foo : int = "%ignore"

foo ();;

Fatal error: exception Ctype.Unify(0)

Process ocaml-toplevel exited abnormally with code 2

@vicuna
Copy link
Author

@vicuna vicuna commented Nov 23, 2015

Comment author: @xavierleroy

Using "%xxx" externals is not for the faint of heart, and there are many other compiler internal errors that can occur from misuses of those externals.

If someone feels strongly enough about this particular error case to implement a proper error message (preferably in less than 5 lines of code), go for it.

@vicuna
Copy link
Author

@vicuna vicuna commented Nov 30, 2015

Comment author: @garrigue

Fixed in commit a1bb570.

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