diff options
Diffstat (limited to 'interp')
| -rw-r--r-- | interp/topconstr.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/interp/topconstr.ml b/interp/topconstr.ml index 89e04b69d2..513fa8f161 100644 --- a/interp/topconstr.ml +++ b/interp/topconstr.ml @@ -176,7 +176,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") | [] -> |
