Skip to content

Commit

Permalink
v8.3: Fixing critical bug in typing match with let-ins in the arity.
Browse files Browse the repository at this point in the history
  • Loading branch information
herbelin committed Nov 23, 2015
1 parent a9461b3 commit 4bed028
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/reduction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ let betazeta_appvect n c v =
if n = 0 then applist (substl env t, stack) else
match kind_of_term t, stack with
Lambda(_,_,c), arg::stacktl -> stacklam (n-1) (arg::env) c stacktl
| LetIn(_,b,_,c), _ -> stacklam (n-1) (b::env) c stack
| LetIn(_,b,_,c), _ -> stacklam (n-1) (substl env b::env) c stack
| _ -> anomaly "Not enough lambda/let's" in
stacklam n [] c (Array.to_list v)

Expand Down
12 changes: 12 additions & 0 deletions test-suite/success/Case22.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(* This wrongly succeeded in 8.3pl5 *)

Inductive IND : forall X:Type, let Y:=X in Type :=
C : IND True.

Definition F (x:IND True) (A:Type) :=
match x in IND Y Z return Z with
C => I
end.

Theorem paradox : False.
Fail Proof (F C False).

0 comments on commit 4bed028

Please sign in to comment.