From 1ac3418389789e7288c5fb3576f787b7c2544342 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sun, 23 Sep 2018 16:55:02 +0200 Subject: Fixing #8532 (regression in Print Assumptions within a functor). The regression was introduced in 1522b989 (PR #7193) which itself was fixing bug #7192. (Note another regression of the same commit which is fixed in #8416.) --- test-suite/bugs/closed/8532.v | 8 ++++++++ vernac/assumptions.ml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test-suite/bugs/closed/8532.v diff --git a/test-suite/bugs/closed/8532.v b/test-suite/bugs/closed/8532.v new file mode 100644 index 0000000000..00aa66e701 --- /dev/null +++ b/test-suite/bugs/closed/8532.v @@ -0,0 +1,8 @@ +(* Checking Print Assumptions relatively to a bound module *) + +Module Type Typ. + Parameter Inline(10) t : Type. +End Typ. +Module Terms_mod (SetVars : Typ). +Print Assumptions SetVars.t. +End Terms_mod. diff --git a/vernac/assumptions.ml b/vernac/assumptions.ml index 0bcd3c64eb..b000745961 100644 --- a/vernac/assumptions.ml +++ b/vernac/assumptions.ml @@ -71,7 +71,7 @@ let rec fields_of_functor f subs mp0 args = function let rec lookup_module_in_impl mp = match mp with | MPfile _ -> Global.lookup_module mp - | MPbound _ -> assert false + | MPbound _ -> Global.lookup_module mp | MPdot (mp',lab') -> if ModPath.equal mp' (Global.current_modpath ()) then Global.lookup_module mp -- cgit v1.2.3