diff options
| author | Pierre-Marie Pédrot | 2020-11-15 00:19:56 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-11-15 00:19:56 +0100 |
| commit | a237a3d2c9de704873e1e20fa38282cf3562cddf (patch) | |
| tree | f5e03d513d2efcf96fa079b9babe0ab6c4ab548a | |
| parent | ecea6eda26e18dfacff3793d6ceed5b63e46bb3e (diff) | |
| parent | 76483168ec6a27a1cf456aa8ead92273e2c74bfd (diff) | |
Merge PR #13350: Fix incorrect "avoid" set in globenv extra data
Reviewed-by: ppedrot
| -rw-r--r-- | engine/evarutil.ml | 3 | ||||
| -rw-r--r-- | test-suite/bugs/closed/bug_13348.v | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/engine/evarutil.ml b/engine/evarutil.ml index 771571fd3f..ba6a9ea6d9 100644 --- a/engine/evarutil.ml +++ b/engine/evarutil.ml @@ -371,7 +371,8 @@ let push_rel_decl_to_named_context let subst = update_var id0 id subst in let d = decl |> NamedDecl.of_rel_decl (fun _ -> id0) |> map_decl (csubst_subst subst) in let nc = replace_var_named_declaration id0 id nc in - (push_var id0 subst, Id.Set.add id avoid, push_named_context_val d nc) + let avoid = Id.Set.add id (Id.Set.add id0 avoid) in + (push_var id0 subst, avoid, push_named_context_val d nc) | Some id0 when hypnaming = FailIfConflict -> user_err Pp.(Id.print id0 ++ str " is already used.") | _ -> diff --git a/test-suite/bugs/closed/bug_13348.v b/test-suite/bugs/closed/bug_13348.v new file mode 100644 index 0000000000..d3d5d3e5b4 --- /dev/null +++ b/test-suite/bugs/closed/bug_13348.v @@ -0,0 +1,10 @@ +Generalizable All Variables. + +Class Inhabited (A : Type) : Type := populate { inhabitant : A }. +Arguments populate {_} _. + +Set Mangle Names. +Axioms _0 _1 _2 : Prop. + +Instance impl_inhabited {A} {B} {_3:Inhabited B} : Inhabited (A -> B) + := populate (fun _ => inhabitant). |
