rust/src/test/compile-fail/constructor-as-cast.rs

14 lines
192 B
Rust
Raw Normal View History

2011-06-14 17:11:35 -05:00
// 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);
}