Add new acceptance test illustrating need for fn call ordering
This commit is contained in:
parent
99c35a6459
commit
0a660c6a21
|
@ -0,0 +1,7 @@
|
|||
# This file was generated by Aiken
|
||||
# You typically do not need to edit this file
|
||||
|
||||
requirements = []
|
||||
packages = []
|
||||
|
||||
[etags]
|
|
@ -0,0 +1,9 @@
|
|||
name = "aiken-lang/acceptance_test_100"
|
||||
version = "0.0.0"
|
||||
license = "Apache-2.0"
|
||||
description = "Aiken contracts for project 'aiken-lang/100'"
|
||||
|
||||
[repository]
|
||||
user = "aiken-lang"
|
||||
project = "100"
|
||||
platform = "github"
|
|
@ -0,0 +1,14 @@
|
|||
pub fn list(fuzzer: Option<a>) -> Option<List<a>> {
|
||||
inner(fuzzer, [])
|
||||
}
|
||||
|
||||
fn inner(fuzzer, xs) -> Option<List<b>> {
|
||||
when fuzzer is {
|
||||
None -> Some(xs)
|
||||
Some(x) -> Some([x, ..xs])
|
||||
}
|
||||
}
|
||||
|
||||
test foo() {
|
||||
list(None) == Some([])
|
||||
}
|
Loading…
Reference in New Issue