Skip to content

Commit

Permalink
compiler: make a pass and fail for #29
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
Zilin Chen authored and Zilin Chen committed Jan 22, 2018
1 parent a1a8070 commit 003f937
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions cogent/tests/fail_ticket-e29.cogent
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

type WordArray a

wordarray_length: all(a :< DSE). (WordArray a)! -> U32

type Buffer = {
data : WordArray U8
, bound : U32
}

buf_length: Buffer! -> U32
buf_length buf = wordarray_length (buf.data)
2 changes: 1 addition & 1 deletion cogent/tests/pass_ticket-e29.cogent
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ type Buffer = {
}

buf_length: Buffer! -> U32
buf_length buf = wordarray_length (buf.data)
buf_length buf = wordarray_length[U8] (buf.data)

0 comments on commit 003f937

Please sign in to comment.