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