Port the tests to the decl foo<T> syntax.
This commit is contained in:
parent
4abc471390
commit
3520499544
86 changed files with 161 additions and 161 deletions
|
@ -1,8 +1,8 @@
|
|||
fn fix_help[A, B](f: @fn(@fn(&A) -> B , &A) -> B , x: &A) -> B {
|
||||
fn fix_help<A, B>(f: @fn(@fn(&A) -> B , &A) -> B , x: &A) -> B {
|
||||
ret f(@bind fix_help(f, _), x);
|
||||
}
|
||||
|
||||
fn fix[A, B](f: @fn(@fn(&A) -> B , &A) -> B ) -> @fn(&A) -> B {
|
||||
fn fix<A, B>(f: @fn(@fn(&A) -> B , &A) -> B ) -> @fn(&A) -> B {
|
||||
ret @bind fix_help(f, _);
|
||||
}
|
||||
|
||||
|
@ -15,4 +15,4 @@ fn main() {
|
|||
let fact = fix(@fact_);
|
||||
assert (fact(5) == 120);
|
||||
assert (fact(2) == 2);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue