rust/src/test/run-pass/issue-3668.rs

15 lines
241 B
Rust
Raw Normal View History

2012-09-19 00:45:24 -05:00
// xfail-test
struct P { child: Option<@mut P> }
trait PTrait {
fn getChildOption() -> Option<@P>;
}
impl P: PTrait {
fn getChildOption() -> Option<@P> {
const childVal: @P = self.child.get();
fail;
}
}
fn main() {}