Fix PR#6174 (non -rectypes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14246 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2013-10-28 11:49:29 +00:00
parent 349f151c0d
commit 09387da800
5 changed files with 22 additions and 1 deletions

View File

@ -47,6 +47,7 @@ OCaml 4.01.1:
Bug fixes:
- PR#6173: Typing error message is worse that before
- PR#6174: OCaml compiler loops on an example using GADTs (non -rectypes)
OCaml 4.01.0:
-------------

View File

@ -0,0 +1,3 @@
type _ t = C : ((('a -> 'o) -> 'o) -> ('b -> 'o) -> 'o) t
let f : type a o. ((a -> o) -> o) t -> (a -> o) -> o =
fun C k -> k (fun x -> x);;

View File

@ -0,0 +1,8 @@
# Characters 118-119:
fun C k -> k (fun x -> x);;
^
Error: Recursive local constraint when unifying
(((ex#0 -> ex#1) -> ex#1) -> (ex#2 -> ex#1) -> ex#1) t
with ((a -> o) -> o) t
#

View File

@ -0,0 +1,8 @@
# Characters 118-119:
fun C k -> k (fun x -> x);;
^
Error: Recursive local constraint when unifying
(((ex#0 -> ex#1) -> ex#1) -> (ex#2 -> ex#1) -> ex#1) t
with ((a -> o) -> o) t
#

View File

@ -1660,7 +1660,8 @@ let rec local_non_recursive_abbrev visited env p ty =
iter_type_expr (local_non_recursive_abbrev visited env p) ty
end
let local_non_recursive_abbrev = local_non_recursive_abbrev (ref [])
let local_non_recursive_abbrev env p =
local_non_recursive_abbrev (ref []) env p
(*****************************)
(* Polymorphic Unification *)