diff options
| author | Emilio Jesus Gallego Arias | 2017-05-24 17:24:46 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2017-05-24 17:41:21 +0200 |
| commit | 6f2c19a1054ce58927dfa5b33131c3665fd5fdf8 (patch) | |
| tree | b8a60ea2387f14a415d53a3cd9db516e384a5b4f /interp/topconstr.ml | |
| parent | a02f76f38592fd84cabd34102d38412f046f0d1b (diff) | |
| parent | 28f8da9489463b166391416de86420c15976522f (diff) | |
Merge branch 'trunk' into located_switch
Diffstat (limited to 'interp/topconstr.ml')
| -rw-r--r-- | interp/topconstr.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/interp/topconstr.ml b/interp/topconstr.ml index eb89b2ef24..4ffb7020f3 100644 --- a/interp/topconstr.ml +++ b/interp/topconstr.ml @@ -179,8 +179,13 @@ let split_at_annot bl na = in (List.rev ans, CLocalAssum (r, k, t) :: rest) end - | CLocalDef _ as x :: rest -> aux (x :: acc) rest - | CLocalPattern (loc,_) :: 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 (_,_) :: rest -> Loc.raise ?loc (Stream.Error "pattern with quote not allowed after fix") | [] -> user_err ?loc |
