diff options
author | Alain Frisch <alain@frisch.fr> | 2010-12-02 11:01:11 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2010-12-02 11:01:11 +0000 |
commit | 90b3da86445db0768178f991bbf341f3b639e653 (patch) | |
tree | 58a963ce403e2fa1ea1740ebe5a340abc6ac9cb9 | |
parent | d95e7e193b8fa99d270670390b9369e2300730bc (diff) | |
download | ocaml-implicits.tar.gz |
Allow to take instances of polymorphic values which are not functions.implicits
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/implicits@10877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | bytecomp/translcore.ml | 4 |
1 files changed, 3 insertions, 1 deletions
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 |