diff options
| author | Alain Frisch <alain@frisch.fr> | 2014-05-05 11:21:45 +0000 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2014-05-05 11:21:45 +0000 |
| commit | 0b3423ef2cd3a7a181ae0d96ec803c347ed6a3bf (patch) | |
| tree | b26719179c2cc2011d4178e4ccb0e539abb8d1e8 /tools | |
| parent | 470131d6b44842a5545ebe91d8f7d83a789a1042 (diff) | |
| download | ocaml-0b3423ef2cd3a7a181ae0d96ec803c347ed6a3bf.tar.gz | |
#6387: also allow attributes on methods in object types (< m [@foo] : int; ..>).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/depend.ml | 2 | ||||
| -rw-r--r-- | tools/tast_iter.ml | 2 | ||||
| -rw-r--r-- | tools/untypeast.ml | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/tools/depend.ml b/tools/depend.ml index e267e4f1da..f009b4a11b 100644 --- a/tools/depend.ml +++ b/tools/depend.ml @@ -43,7 +43,7 @@ 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 (fun (_, _, t) -> add_type bv t) fl | Ptyp_class(c, tl) -> add bv c; List.iter (add_type bv) tl | Ptyp_alias(t, s) -> add_type bv t | Ptyp_variant(fl, _, _) -> diff --git a/tools/tast_iter.ml b/tools/tast_iter.ml index a7723c88dc..b28731613a 100644 --- a/tools/tast_iter.ml +++ b/tools/tast_iter.ml @@ -303,7 +303,7 @@ let core_type sub ct = | Ttyp_constr (_path, _, list) -> List.iter (sub # core_type) list | Ttyp_object (list, _o) -> - List.iter (fun (_, t) -> sub # core_type t) list + List.iter (fun (_, _, t) -> sub # core_type t) list | Ttyp_class (_path, _, list) -> List.iter (sub # core_type) list | Ttyp_alias (ct, _s) -> diff --git a/tools/untypeast.ml b/tools/untypeast.ml index e8e392f681..c887c089e9 100644 --- a/tools/untypeast.ml +++ b/tools/untypeast.ml @@ -558,7 +558,8 @@ and untype_core_type ct = Ptyp_constr (lid, List.map untype_core_type list) | Ttyp_object (list, o) -> - Ptyp_object (List.map (fun (s, t) -> (s, untype_core_type t)) list, o) + Ptyp_object + (List.map (fun (s, a, t) -> (s, a, untype_core_type t)) list, o) | Ttyp_class (_path, lid, list) -> Ptyp_class (lid, List.map untype_core_type list) | Ttyp_alias (ct, s) -> |
