diff options
| author | Hugo Herbelin | 2018-08-04 11:55:46 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2018-09-24 18:10:55 +0200 |
| commit | 5780336e3be522f76906b719c3d3694f243a5bdb (patch) | |
| tree | 35bf477a6f216b2f75fecbc6caeb9fbadfa0f6f7 /test-suite | |
| parent | fb8365e96ccb5d25d3810af99c36e7b27fec8fad (diff) | |
Fixes #8215 ("critical" bug of type inference in interpreting evars by names).
When interpreting an existential variable "?n@{inst}" in the current
context, check that variables bound to local definitions are replaced
by variables with convertible body.
Also give a message explaining the type error or non-convertibility
error rather than wrongly saying that there is no binding for the
variable.
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/bugs/closed/8215.v | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/8215.v b/test-suite/bugs/closed/8215.v new file mode 100644 index 0000000000..c4b29a6354 --- /dev/null +++ b/test-suite/bugs/closed/8215.v @@ -0,0 +1,14 @@ +(* Check that instances for local definitions in evars have compatible body *) +Goal False. +Proof. + pose (n := 1). + evar (m:nat). + subst n. + pose (n := 0). + Fail Check ?m. (* n cannot be reinterpreted with a value convertible to 1 *) + clearbody n. + Fail Check ?m. (* n cannot be reinterpreted with a value convertible to 1 *) + clear n. + pose (n := 0+1). + Check ?m. (* Should be ok *) +Abort. |
