summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2003-05-23 07:51:37 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2003-05-23 07:51:37 +0000
commite444680a34164e0fa51090d12ca8f33cef01cd2f (patch)
tree300307871c48ab7dc7caf9534f576e6b980adc60
parent8150c79b939d1051b2c8a59a1f4d0fbdcd624e38 (diff)
restore variance for constructed types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--typing/typedecl.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/typing/typedecl.ml b/typing/typedecl.ml
index 0bb25ddcb..e55ba035a 100644
--- a/typing/typedecl.ml
+++ b/typing/typedecl.ml
@@ -448,6 +448,7 @@ let compute_variance_decl env decl (required, loc) =
List.map2
(fun (_, co, cn, ct) (c, n) ->
if c && !cn || n && !co then raise (Error(loc, Bad_variance));
+ let ct = if decl.type_kind = Type_abstract then ct else cn in
(!co, !cn, !ct))
tvl required