git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1580 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jérôme Vouillon 1997-06-05 14:15:41 +00:00
parent ab34115864
commit 96b8fedbf1
1 changed files with 4 additions and 4 deletions

View File

@ -347,11 +347,11 @@ let type_class_field env var_env self cl
let ty' = Ctype.expand_head var_env self' in
begin match ty'.desc with
Tobject (fi, _) ->
if not (Ctype.opened_object self') then
if not (Ctype.opened_object ty') then
begin try
Ctype.unify var_env self (Ctype.newobj (closed_scheme fi))
with Ctype.Unify _ ->
let lab = missing_method var_env self' self in
let lab = missing_method var_env ty' self in
raise(Error(loc, Closed_ancestor (cl.pcl_name, path, lab)))
end;
Ctype.unify var_env ty' self;
@ -818,11 +818,11 @@ let type_class_field env var_env self cl (vars_sig, meths_sig) =
begin match ty'.desc with
Tobject (fi, _) ->
if ty' != Ctype.expand_head var_env self then begin
if not (Ctype.opened_object self') then
if not (Ctype.opened_object ty') then
begin try
Ctype.unify var_env self (Ctype.newobj (closed_scheme fi))
with Ctype.Unify _ ->
let lab = missing_method var_env self' self in
let lab = missing_method var_env ty' self in
raise(Error(loc, Closed_ancestor (cl.pcty_name, path, lab)))
end;
Ctype.unify var_env ty' self;