From f2dc6898a748ea78b7de23a307a839577d5bad24 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 16 Feb 2018 23:15:15 +0100 Subject: 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. --- test-suite/bugs/closed/6774.v | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test-suite/bugs/closed/6774.v (limited to 'test-suite') 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. -- cgit v1.2.3