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 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") | [] -> |
