Fix tests for field parsing changes
This commit is contained in:
parent
1088006ed9
commit
c19c24d193
@ -5,7 +5,7 @@ struct cat {
|
||||
|
||||
impl cat : Drop {
|
||||
fn finalize(&self) {
|
||||
self.done(self.meows);
|
||||
(self.done)(self.meows);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ type kitty_info = {kitty: cat};
|
||||
|
||||
// Code compiles and runs successfully if we add a + before the first arg
|
||||
fn nyan(kitty: cat, _kitty_info: kitty_info) {
|
||||
kitty.meow();
|
||||
(kitty.meow)();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -4,5 +4,5 @@ fn compute(i: mytype) -> int { return i.val + 20; }
|
||||
|
||||
fn main() {
|
||||
let myval = mytype({compute: compute, val: 30});
|
||||
assert (myval.compute(myval) == 50);
|
||||
assert ((myval.compute)(myval) == 50);
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ fn main() {
|
||||
let mut i = 3;
|
||||
let cl_box = box_it(|| i += 1);
|
||||
assert i == 3;
|
||||
cl_box.cl();
|
||||
(cl_box.cl)();
|
||||
assert i == 4;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ fn box_it(+x: &r/fn()) -> closure_box/&r {
|
||||
}
|
||||
|
||||
fn call_static_closure(cl: closure_box/&static) {
|
||||
cl.cl();
|
||||
(cl.cl)();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -7,7 +7,7 @@ struct finish<T: Copy> {
|
||||
|
||||
impl<T: Copy> finish<T> : Drop {
|
||||
fn finalize(&self) {
|
||||
self.arg.fin(self.arg.val);
|
||||
(self.arg.fin)(self.arg.val);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user