From 90b3da86445db0768178f991bbf341f3b639e653 Mon Sep 17 00:00:00 2001 From: Alain Frisch Date: Thu, 2 Dec 2010 11:01:11 +0000 Subject: Allow to take instances of polymorphic values which are not functions. git-svn-id: http://caml.inria.fr/svn/ocaml/branches/implicits@10877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- bytecomp/translcore.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bytecomp/translcore.ml b/bytecomp/translcore.ml index 8005f39691..7e820c269b 100644 --- a/bytecomp/translcore.ml +++ b/bytecomp/translcore.ml @@ -579,7 +579,9 @@ let transl_implicit loc env ty (gen, non_gen) = let rec try_decl can_gen id = let (path, decl) = Ident.find_same id values in - if equal env false [ty] [decl.val_type] then + if equal env false [ty] [decl.val_type] || + (can_gen && Ctype.matches env ty decl.val_type) + then transl_path path else let t = expand_head env (if can_gen then instance decl.val_type else decl.val_type) in -- cgit v1.2.1