diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-09-29 15:17:02 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-09-29 15:30:56 +0200 |
commit | c1c488d08857636381d6cbf3a9202e7123923dd0 (patch) | |
tree | c571a22398cc96781b6e72c89c9279d3b55e62f3 | |
parent | 5348a615a484e379896deac8a6944af1f92b2d4c (diff) |
Fix bug #5011: Anomaly on [Existing Class].
-rw-r--r-- | test-suite/bugs/closed/5011.v | 2 | ||||
-rw-r--r-- | toplevel/record.ml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test-suite/bugs/closed/5011.v b/test-suite/bugs/closed/5011.v new file mode 100644 index 000000000..c3043ca5d --- /dev/null +++ b/test-suite/bugs/closed/5011.v @@ -0,0 +1,2 @@ +Record decoder (n : nat) W := { decode : W -> nat }. +Existing Class decoder. diff --git a/toplevel/record.ml b/toplevel/record.ml index 71d070776..9c4d41ea5 100644 --- a/toplevel/record.ml +++ b/toplevel/record.ml @@ -521,11 +521,9 @@ let add_inductive_class ind = | LocalDef _ -> None | LocalAssum (_, t) -> Some (lazy t) in - let args = List.map_filter map ctx in - let ty = Inductive.type_of_inductive_knowing_parameters + let ty = Inductive.type_of_inductive (push_rel_context ctx (Global.env ())) ((mind,oneind),inst) - (Array.of_list args) in { cl_impl = IndRef ind; cl_context = List.map (const None) ctx, ctx; |