aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
authorMaxime Dénès2017-04-28 11:25:29 +0200
committerMaxime Dénès2017-04-28 11:25:29 +0200
commit66a68a4329ce199f25184ba8b2d98b4679e7ddae (patch)
treece90c93341c58e82813da8b1a567ce6a3f3ed424 /interp
parent0a255f51809e8d29a7239bfbd9fe57a8b2b41705 (diff)
parent2ddc9d12bd4616f10245c40bc0c87ae548911809 (diff)
Merge PR#531: Fixing bug #5420 and many similar bugs due to the presence of let-ins
Diffstat (limited to 'interp')
-rw-r--r--interp/topconstr.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/interp/topconstr.ml b/interp/topconstr.ml
index d3142e7f0c..e05be65fb0 100644
--- a/interp/topconstr.ml
+++ b/interp/topconstr.ml
@@ -178,7 +178,12 @@ let split_at_annot bl na =
in
(List.rev ans, CLocalAssum (r, k, t) :: rest)
end
- | CLocalDef _ as x :: rest -> aux (x :: acc) rest
+ | CLocalDef ((_,na),_,_) as x :: rest ->
+ if Name.equal (Name id) na then
+ user_err ~loc
+ (Nameops.pr_id id ++ str" must be a proper parameter and not a local definition.")
+ else
+ aux (x :: acc) rest
| CLocalPattern (loc,_,_) :: rest ->
Loc.raise ~loc (Stream.Error "pattern with quote not allowed after fix")
| [] ->