Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006690OCamltypingpublic2014-12-03 18:312016-12-07 11:37
Reportermandrykin 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSLinux (3.2.0)OS VersionUbuntu 12.04
Product Version4.02.1 
Target VersionFixed in Version4.02.2+dev / +rc1 
Summary0006690: Uncaught exception (Not_found) with (wrong) wildcard or unification type variable in place of a local abstract type
DescriptionThe 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
TagsNo tags attached.
Attached Files? file icon test_wildcard_or_variabe.ml [^] (754 bytes) 2014-12-03 18:31 [Show Content]

- Relationships

-  Notes
(0012641)
mandrykin (reporter)
2014-12-03 18:55

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.
(0012706)
garrigue (manager)
2014-12-08 09:03

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

- Issue History
Date Modified Username Field Change
2014-12-03 18:31 mandrykin New Issue
2014-12-03 18:31 mandrykin File Added: test_wildcard_or_variabe.ml
2014-12-03 18:55 mandrykin Note Added: 0012641
2014-12-08 09:03 garrigue Note Added: 0012706
2014-12-08 09:03 garrigue Status new => resolved
2014-12-08 09:03 garrigue Fixed in Version => 4.02.2+dev / +rc1
2014-12-08 09:03 garrigue Resolution open => fixed
2014-12-08 09:03 garrigue Assigned To => garrigue
2016-12-07 11:37 xleroy Status resolved => closed
2017-02-23 16:45 doligez Category OCaml typing => typing


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker