2012-09-19 00:33:49 -05:00
|
|
|
struct P { child: Option<@mut P> }
|
|
|
|
trait PTrait {
|
|
|
|
fn getChildOption() -> Option<@P>;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl P: PTrait {
|
|
|
|
fn getChildOption() -> Option<@P> {
|
2012-10-15 16:33:32 -05:00
|
|
|
const childVal: @P = self.child.get(); //~ ERROR attempt to use a non-constant value in a constant
|
2012-09-19 00:33:49 -05:00
|
|
|
fail;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|