summaryrefslogtreecommitdiffstats
path: root/typing/typeclass.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-04-15 17:26:32 +0000
committerAlain Frisch <alain@frisch.fr>2013-04-15 17:26:32 +0000
commitdd200d9553d3c17dfef4c5e7f1b4ceed66661856 (patch)
treec5890bda1df32a84a33f877afe235b891135539e /typing/typeclass.ml
parentabeb8c97f29f7fa6cd47c7e82448842a4b6e5f28 (diff)
Allow the method body to be represented by a non Pexp_poly expression in the Parsetree.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13530 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'typing/typeclass.ml')
-rw-r--r--typing/typeclass.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/typing/typeclass.ml b/typing/typeclass.ml
index a1d17c280..96fa5c6b1 100644
--- a/typing/typeclass.ml
+++ b/typing/typeclass.ml
@@ -608,6 +608,11 @@ let rec class_field self_loc cl_num self_type meths vars
concr_meths, warn_vals, inher)
| Pcf_method (lab, priv, Cfk_concrete (ovf, expr)) ->
+ let expr =
+ match expr.pexp_desc with
+ | Pexp_poly _ -> expr
+ | _ -> Ast_helper.Exp.poly ~loc:expr.pexp_loc expr None
+ in
if Concr.mem lab.txt concr_meths then begin
if ovf = Fresh then
Location.prerr_warning loc (Warnings.Method_override [lab.txt])