2013-01-03 17:35:19 -06:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
// xfail-test
|
|
|
|
struct Obj {
|
|
|
|
member: uint
|
|
|
|
}
|
|
|
|
|
2013-02-26 19:47:41 -06:00
|
|
|
pub impl Obj {
|
2013-03-22 13:23:21 -05:00
|
|
|
fn boom() -> bool {
|
2013-01-03 17:35:19 -06:00
|
|
|
return 1+1 == 2
|
|
|
|
}
|
2013-03-22 13:23:21 -05:00
|
|
|
fn chirp() {
|
2013-01-03 17:35:19 -06:00
|
|
|
self.boom(); //~ ERROR wat
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let o = Obj { member: 0 };
|
|
|
|
o.chirp();
|
|
|
|
1 + 1;
|
|
|
|
}
|