Add pass-by-ref annotation to the tests to make them typecheck

Issue #1008
This commit is contained in:
Marijn Haverbeke 2011-10-06 12:50:24 +02:00
parent fe916fb9f0
commit 41528dc543
24 changed files with 49 additions and 47 deletions

View file

@ -12,7 +12,7 @@ fn test_generic<@T>(expected: T, eq: compare<T>) {
}
fn test_bool() {
fn compare_bool(b1: bool, b2: bool) -> bool { ret b1 == b2; }
fn compare_bool(&&b1: bool, &&b2: bool) -> bool { ret b1 == b2; }
let eq = bind compare_bool(_, _);
test_generic::<bool>(true, eq);
}