diff options
| author | Pierre-Marie Pédrot | 2018-05-28 01:00:23 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2018-06-07 13:18:50 +0200 |
| commit | e398b8b5dadb0cd75cd6cfb86525ccb039d75d49 (patch) | |
| tree | b75f75b6bf98babcb7163194b2e716f2ca53eb7c /kernel/modops.ml | |
| parent | 28ca5295339afecfc4ecb70214f6f575c11e34a1 (diff) | |
Fix #7615: Functor inlining drops universe substitution.
We store the universe context in the inlined terms and apply it to
the instance provided to the substitution function. Technically the
context is not needed, but we use it to assert that the length of the
instance corresponds, just in case.
Diffstat (limited to 'kernel/modops.ml')
| -rw-r--r-- | kernel/modops.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/modops.ml b/kernel/modops.ml index 2038171183..22f523a9ae 100644 --- a/kernel/modops.ml +++ b/kernel/modops.ml @@ -403,7 +403,8 @@ let inline_delta_resolver env inl mp mbid mtb delta = | Undef _ | OpaqueDef _ -> l | Def body -> let constr = Mod_subst.force_constr body in - add_inline_delta_resolver kn (lev, Some constr) l + let ctx = Declareops.constant_polymorphic_context constant in + add_inline_delta_resolver kn (lev, Some (ctx, constr)) l with Not_found -> error_no_such_label_sub (Constant.label con) (ModPath.to_string (Constant.modpath con)) |
