diff options
Diffstat (limited to 'kernel/term_typing.ml')
| -rw-r--r-- | kernel/term_typing.ml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml index 97d2fe5218..6b44bcad3f 100644 --- a/kernel/term_typing.ml +++ b/kernel/term_typing.ml @@ -26,8 +26,9 @@ open Type_errors open Indtypes open Typeops -let constrain_type env j cst1 poly = function - | None -> make_polymorphic env j, cst1 +let constrain_type env j cst1 = function + | None -> + make_polymorphic_if_constant_for_ind env j, cst1 | Some t -> let (tj,cst2) = infer_type env t in let (_,cst3) = judge_of_cast env j DEFAULTcast tj in @@ -92,9 +93,7 @@ let infer_declaration env dcl = match dcl with | DefinitionEntry c -> let (j,cst) = infer env c.const_entry_body in - let (typ,cst) = constrain_type env j cst - c.const_entry_polymorphic c.const_entry_type - in + let (typ,cst) = constrain_type env j cst c.const_entry_type in let def = if c.const_entry_opaque then OpaqueDef (Declarations.opaque_from_val j.uj_val) |
