Skip to content

Commit

Permalink
+1 test
Browse files Browse the repository at this point in the history
  • Loading branch information
cp526 committed Sep 12, 2023
1 parent 57e524d commit b2a10c9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/cn/incomplete_match.error.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

/*@
datatype mylist {
Nil {},
Cons {integer hd, datatype mylist tl}
}
function (integer) snd (datatype mylist t) {
match t {
Cons {hd: _, tl: Cons {hd: v, tl: _}} => { v }
Nil {} => { 0 }
}
}
@*/

void
check_foo (int x)
/*@ ensures snd(Cons {hd: 10, tl: Cons {hd: 20, tl: Nil {}}}) == 20 @*/
{
}


0 comments on commit b2a10c9

Please sign in to comment.