aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_constr.ml42
-rw-r--r--parsing/ppconstr.ml2
2 files changed, 2 insertions, 2 deletions
diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4
index 9c8632a6d3..835d66434d 100644
--- a/parsing/g_constr.ml4
+++ b/parsing/g_constr.ml4
@@ -293,7 +293,7 @@ GEXTEND Gram
(match p with
| CPatAtom (_, Some r) -> CPatCstr (loc, r, lp)
| _ -> Util.user_err_loc
- (cases_pattern_loc p, "compound_pattern",
+ (cases_pattern_expr_loc p, "compound_pattern",
Pp.str "Constructor expected"))
| p = pattern; "as"; id = ident ->
CPatAlias (loc, p, id) ]
diff --git a/parsing/ppconstr.ml b/parsing/ppconstr.ml
index 4ac2cbe9e0..a003c14059 100644
--- a/parsing/ppconstr.ml
+++ b/parsing/ppconstr.ml
@@ -178,7 +178,7 @@ let rec pr_patt sep inh p =
| CPatPrim (_,p) -> pr_prim_token p, latom
| CPatDelimiters (_,k,p) -> pr_delimiters k (pr_patt mt lsimple p), 1
in
- let loc = cases_pattern_loc p in
+ let loc = cases_pattern_expr_loc p in
pr_with_comments loc
(sep() ++ if prec_less prec inh then strm else surround strm)