Skip to content

Commit

Permalink
Fix Class_tactics.run_on_goals setting incorrect typeclass evars
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySkimmer committed Oct 5, 2023
1 parent 4429d4b commit 6d5365f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tactics/class_tactics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ module Search = struct
in
let nongoals' =
Evar.Set.fold (fun ev acc -> match Evarutil.advance evm' ev with
| Some ev' -> Evar.Set.add ev acc
| Some ev -> Evar.Set.add ev acc
| None -> acc) (Evar.Set.union goals nongoals) (Evd.get_typeclass_evars evm')
in
(* FIXME: the need to merge metas seems to come from this being called
Expand Down
10 changes: 10 additions & 0 deletions test-suite/bugs/bug_18127.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Class Class1 (hom : Type) (c : hom) : Type := {
var1 : hom -> Type;
var2 : hom;
}.

Class Class2 {h c} (C : Class1 h c) (fmap : h -> h) := {
var3 : var1 (fmap var2);
}.

Definition var3_cast : forall {h c C fm}, Class2 C fm -> var1 (fm var2) := @var3.

0 comments on commit 6d5365f

Please sign in to comment.