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

Comments

Projects
None yet
2 participants
@vicuna
Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

commented Nov 30, 2015

Comment author: @garrigue

Fixed in commit a1bb570.

@vicuna vicuna closed this Feb 16, 2017

@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.