Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ fix #3143 ] traverse as-patterns when constructing terms matching an impossible LHS #3146

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/TTImp/Impossible.idr
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ mutual
Core ClosedTerm
mkTerm (IVar fc n) mty exps autos named
= buildApp fc n mty exps autos named
mkTerm (IAs fc fc' u n pat) mty exps autos named
= mkTerm pat mty exps autos named
mkTerm (IApp fc fn arg) mty exps autos named
= mkTerm fn mty (arg :: exps) autos named
mkTerm (IAutoApp fc fn arg) mty exps autos named
Expand Down
5 changes: 5 additions & 0 deletions tests/idris2/coverage/coverage020/Issue3143.idr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Data.Nat

failing "f is not covering."
f : {n : Nat} -> LT n n -> Void
f x@LTEZero impossible
1 change: 1 addition & 0 deletions tests/idris2/coverage/coverage020/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1/1: Building Issue3143 (Issue3143.idr)
3 changes: 3 additions & 0 deletions tests/idris2/coverage/coverage020/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
. ../../../testutils.sh

check Issue3143.idr
Loading