rust/src/test/compile-fail/constructor-as-cast.rs
2011-06-14 15:11:48 -07:00

14 lines
192 B
Rust

// error-pattern: unresolved name: base
type base =
obj {
fn foo();
};
obj derived() {
fn foo() {}
fn bar() {}
}
fn main() {
let derived d = derived();
let base b = base(d);
}