diff options
| author | Hugo Herbelin | 2017-10-05 00:41:29 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2017-10-05 00:45:52 +0200 |
| commit | d24bab45123f4e4eb3918be55fb1a7dc54be2b3b (patch) | |
| tree | 137b6b559d5ccc1e9ddcb9ff768e2d625d578bfc | |
| parent | b9740771e8113cb9e607793887be7a12587d0326 (diff) | |
Fixing #5765 (an anomaly with 'pat in parameters of inductive definition).
| -rw-r--r-- | test-suite/bugs/closed/5765.v | 3 | ||||
| -rw-r--r-- | vernac/command.ml | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/test-suite/bugs/closed/5765.v b/test-suite/bugs/closed/5765.v new file mode 100644 index 0000000000..343ab49357 --- /dev/null +++ b/test-suite/bugs/closed/5765.v @@ -0,0 +1,3 @@ +(* 'pat binder not (yet?) allowed in parameters of inductive types *) + +Fail Inductive X '(a,b) := x. diff --git a/vernac/command.ml b/vernac/command.ml index 120f9590f2..a1a87d54e0 100644 --- a/vernac/command.ml +++ b/vernac/command.ml @@ -518,7 +518,8 @@ let check_param = function | CLocalDef (na, _, _) -> check_named na | CLocalAssum (nas, Default _, _) -> List.iter check_named nas | CLocalAssum (nas, Generalized _, _) -> () -| CLocalPattern _ -> assert false +| CLocalPattern (loc,_) -> + Loc.raise ?loc (Stream.Error "pattern with quote not allowed here.") let interp_mutual_inductive (paramsl,indl) notations cum poly prv finite = check_all_names_different indl; |
