From 414e4ea9f226ade9686da28ebee39cd1b93f42a6 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Mon, 22 May 2017 10:13:47 +0200 Subject: Fixing #5547 (typability of return predicate in nested pattern-matching). Answering to commit about #5500: we don't know in general if the return predicate T(y1,..,yn,x) in the intermediate step of a nested pattern-matching is a sort, but we don't even know if it is well-typed: retyping is not enough, we need full typing. --- pretyping/cases.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'pretyping/cases.ml') diff --git a/pretyping/cases.ml b/pretyping/cases.ml index a5b7a9e6f..a48889c6c 100644 --- a/pretyping/cases.ml +++ b/pretyping/cases.ml @@ -1427,6 +1427,7 @@ and match_current pb (initial,tomatch) = let case = make_case_or_project pb.env !(pb.evdref) indf ci pred current brvals in + let _ = Typing.e_type_of pb.env pb.evdref pred in Typing.check_allowed_sort pb.env !(pb.evdref) mind current pred; { uj_val = applist (case, inst); uj_type = prod_applist !(pb.evdref) typ inst } -- cgit v1.2.3