diff options
author | Mark Li <rli@twitter.com> | 2017-03-09 20:46:48 -0800 |
---|---|---|
committer | Runhang Li <marklrh@gmail.com> | 2017-03-22 21:47:34 -0700 |
commit | 9dc86f84172a565c221516289eaadc7f0dad1d5e (patch) | |
tree | a42eb6f1efee32d19ab22cc9b37d5ac1775f9631 /parsing/depend.ml | |
parent | affc935fc91a020759d9eaa413123add07be76eb (diff) | |
download | ocaml-9dc86f84172a565c221516289eaadc7f0dad1d5e.tar.gz |
Support inherited field in object type expression.
Also add location on object field label and polymorphic variant tags.
Diffstat (limited to 'parsing/depend.ml')
-rw-r--r-- | parsing/depend.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/parsing/depend.ml b/parsing/depend.ml index 8703ffe019..42af0c5251 100644 --- a/parsing/depend.ml +++ b/parsing/depend.ml @@ -102,7 +102,10 @@ let rec add_type bv ty = | Ptyp_arrow(_, t1, t2) -> add_type bv t1; add_type bv t2 | Ptyp_tuple tl -> List.iter (add_type bv) tl | Ptyp_constr(c, tl) -> add bv c; List.iter (add_type bv) tl - | Ptyp_object (fl, _) -> List.iter (fun (_, _, t) -> add_type bv t) fl + | Ptyp_object (fl, _) -> + List.iter + (function Otag (_, _, t) -> add_type bv t + | Oinherit t -> add_type bv t) fl | Ptyp_class(c, tl) -> add bv c; List.iter (add_type bv) tl | Ptyp_alias(t, _) -> add_type bv t | Ptyp_variant(fl, _, _) -> |