aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/bugs
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-02-16 23:15:15 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-02-20 21:50:28 +0100
commitf2dc6898a748ea78b7de23a307a839577d5bad24 (patch)
treec6436a2f6475e2fe61605323ef61772e0b9d4c0b /test-suite/bugs
parentaec63ba9c8f6840d98ba731640a786138d836343 (diff)
Fixes bug #6774 (anomaly with ill-typed template polymorphism).
Computation of the sort of the inductive type was done before ensuring that the arguments of the inductive type had the correct types, possibly brutally failing with `NotArity` in case one of the types expected to be typed with an arity was not so.
Diffstat (limited to 'test-suite/bugs')
-rw-r--r--test-suite/bugs/closed/6774.v7
1 files changed, 7 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/6774.v b/test-suite/bugs/closed/6774.v
new file mode 100644
index 000000000..9625af91f
--- /dev/null
+++ b/test-suite/bugs/closed/6774.v
@@ -0,0 +1,7 @@
+(* Was an anomaly with ill-typed template polymorphism *)
+Definition huh (b:bool) := if b then Set else Prop.
+Definition lol b: huh b :=
+ if b return huh b then nat else True.
+Goal (lol true) * unit.
+Fail generalize true. (* should fail with error, not anomaly *)
+Abort.