diff options
| author | Alain Frisch <alain@frisch.fr> | 2014-05-04 20:42:34 +0000 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2014-05-04 20:42:34 +0000 |
| commit | 0f1bb864df2b92d2ffc87d62a539d6cd2f1ab403 (patch) | |
| tree | 58723a978cd4498c7699008fcabaffaedfd69871 /bytecomp/translclass.ml | |
| parent | efc23798ead848da3a2bf41b243094f959740163 (diff) | |
| download | ocaml-0f1bb864df2b92d2ffc87d62a539d6cd2f1ab403.tar.gz | |
Add support for floating attributes in class structures and class signatures. (Patch by Leo White.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14736 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/translclass.ml')
| -rw-r--r-- | bytecomp/translclass.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bytecomp/translclass.ml b/bytecomp/translclass.ml index 72022a5e3a..1f594453f6 100644 --- a/bytecomp/translclass.ml +++ b/bytecomp/translclass.ml @@ -145,7 +145,7 @@ let rec build_object_init cl_table obj params inh_init obj_init cl = | Tcf_val (_, _, id, Tcfk_concrete (_, exp), _) -> (inh_init, lsequence (set_inst_var obj id exp) obj_init, has_init) - | Tcf_method _ | Tcf_val _ | Tcf_constraint _ -> + | Tcf_method _ | Tcf_val _ | Tcf_constraint _ | Tcf_attribute _ -> (inh_init, obj_init, has_init) | Tcf_initializer _ -> (inh_init, obj_init, true) @@ -305,7 +305,9 @@ let rec build_class_init cla cstr super inh_init cl_init msubst top cl = Lsequence(mkappl (oo_prim "add_initializer", Lvar cla :: msubst false (transl_exp exp)), cl_init), - methods, values)) + methods, values) + | Tcf_attribute _ -> + (inh_init, cl_init, methods, values)) str.cstr_fields (inh_init, cl_init, [], []) in |
