Commit 5a5e2d91 authored by Pietro Abate's avatar Pietro Abate
Browse files

Fix variable variance annotations

parent da312a99
......@@ -310,7 +310,7 @@ module IType = struct
all_delayed := [];
List.iter check_one_delayed l
let rec derecurs variance env p =
let rec derecurs variance env p =
let neg = function
|`Covariant -> `ContraVariant
|`ContraVariant -> `Covariant
......@@ -320,9 +320,10 @@ module IType = struct
| TVar s -> begin
try
let v = Hashtbl.find env.penv_var s in
mk_type (Types.var (Var.ch_variance variance v))
Var.ch_variance variance v;
mk_type (Types.var v)
with Not_found -> begin
let v = Var.mk ~variance s in
let v = Var.mk ~variance s in
Hashtbl.add env.penv_var s v;
mk_type (Types.var v)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment