]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixed: a MutCase considering a wrong number of cases was not detected.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 25 Oct 2007 16:41:20 +0000 (16:41 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 25 Oct 2007 16:41:20 +0000 (16:41 +0000)
helm/software/components/cic_unification/cicRefine.ml

index 4b310ef75637fd6a1e1127fcbc181a84fa4006fd..7f5ab6883c975609e1ec6336f5fdb98198a30ba5 100644 (file)
@@ -527,6 +527,10 @@ and type_of_aux' ?(localization_tbl = Cic.CicHash.create 1) metasenv context t
                        (lazy ("Unkown mutual inductive definition " ^ 
                          U.string_of_uri uri)))
            in
+           if List.length constructors <> List.length pl then
+            enrich localization_tbl t
+             (RefineFailure
+               (lazy "Wrong number of cases")) ;
            let rec count_prod t =
              match CicReduction.whd ~subst context t with
                  C.Prod (_, _, t) -> 1 + (count_prod t)