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 (Not_found) with (wrong) wildcard or unification type variable in place of a local abstract type #6690

Closed
vicuna opened this Issue Dec 3, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Dec 3, 2014

Original bug ID: 6690
Reporter: mandrykin
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:37:04Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: x86_64
OS: Linux (3.2.0)
OS Version: Ubuntu 12.04
Version: 4.02.1
Fixed in version: 4.02.2+dev / +rc1
Category: typing
Monitored by: @gasche

Bug description

The ocamlopt compiler fails when compiling the attached file.
Tested with current trunk version (@15621).

Failure occurs for both the first and the second wrong `vexpr' functions (they both have incorrect type annotations), the commented correct function compiles successfully.

Steps to reproduce

$ ocamlopt -version
4.03.0+dev5-2014-10-15
$ ocamlopt test_wildcard_or_variabe.ml
Fatal error: exception Not_found

File attachments

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Dec 3, 2014

Comment author: mandrykin

Actually, a wildcard or a type variable in place of the concrete type (unit or whatever) is also necessary to reproduce the failure, as the following

let vexpr (type visit_action) : (unit, 'result, visit_action) context -> unit -> visit_action =
function
| Local -> fun _ -> raise Exit
| Global -> fun _ -> raise Exit

leads to an error message.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Dec 8, 2014

Comment author: @garrigue

This was an unprotected function call.
Fixed in 4.02 and trunk at revisions 15639 and 15637.

@vicuna vicuna closed this Dec 7, 2016

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