diff options
| author | Gaëtan Gilbert | 2019-05-16 14:32:09 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2019-05-16 15:40:50 +0200 |
| commit | 11533785773269d9632ef8925ed34ea2d541818b (patch) | |
| tree | a814044c27d45a10373c5a42739ad302c29e00ce /interp/implicit_quantifiers.ml | |
| parent | 21269d0fef6794a672c36abdc5760889adc0e09c (diff) | |
Fix #10176: shadowing vs automatic class based generalization
Diffstat (limited to 'interp/implicit_quantifiers.ml')
| -rw-r--r-- | interp/implicit_quantifiers.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/interp/implicit_quantifiers.ml b/interp/implicit_quantifiers.ml index f71ad14dd4..851109876b 100644 --- a/interp/implicit_quantifiers.ml +++ b/interp/implicit_quantifiers.ml @@ -221,8 +221,10 @@ let implicit_application env ?(allow_partial=true) f ty = let is_class = try let ({CAst.v=(qid, _, _)} as clapp) = destClassAppExpl ty in - let gr = Nametab.locate qid in - if Typeclasses.is_class gr then Some (clapp, gr) else None + if Libnames.idset_mem_qualid qid env then None + else + let gr = Nametab.locate qid in + if Typeclasses.is_class gr then Some (clapp, gr) else None with Not_found -> None in match is_class with |
