rust/src/test/run-pass/issue-2935.rs
2012-08-08 18:19:24 -07:00

24 lines
388 B
Rust

//type t = { a: int };
// type t = { a: bool };
type t = bool;
trait it {
fn f();
}
impl t: it {
fn f() { }
}
fn main() {
// let x = ({a: 4i} as it);
// let y = @({a: 4i});
// let z = @({a: 4i} as it);
// let z = @({a: true} as it);
let z = @(true as it);
// x.f();
// y.f();
// (*z).f();
#error["ok so far..."];
z.f(); //segfault
}