2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2011-08-12 08:37:25 -05:00
|
|
|
fn id<T>(t: &T) -> T { ret t; }
|
2011-03-08 18:31:37 -06:00
|
|
|
|
|
|
|
fn main() {
|
2011-07-27 07:19:39 -05:00
|
|
|
let t = {a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7};
|
2011-07-26 07:49:40 -05:00
|
|
|
assert (t.f == 6);
|
2011-07-27 07:19:39 -05:00
|
|
|
let f0 = bind id(t);
|
2011-07-26 07:49:40 -05:00
|
|
|
assert (f0().f == 6);
|
2011-08-12 08:37:25 -05:00
|
|
|
}
|