about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-01-03 15:35:19 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-03 15:35:19 -0800
commit9e2a59dc5d9b5fd95ff07f4bf91a4a6b5f77949f (patch)
treefabef36bc996f930e95112728a52dec2016f98dc
parent7b08ed02bbdaada73dd40e13ccbb94f0437e88b6 (diff)
downloadrust-9e2a59dc5d9b5fd95ff07f4bf91a4a6b5f77949f.tar.gz
rust-9e2a59dc5d9b5fd95ff07f4bf91a4a6b5f77949f.zip
Add xfailed test for #3707
-rw-r--r--src/test/compile-fail/issue-3707.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-3707.rs b/src/test/compile-fail/issue-3707.rs
new file mode 100644
index 00000000000..c166c400b36
--- /dev/null
+++ b/src/test/compile-fail/issue-3707.rs
@@ -0,0 +1,29 @@
+// 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
+}
+
+impl Obj {
+    static pure fn boom() -> bool {
+        return 1+1 == 2
+    }
+    pure fn chirp() {
+        self.boom(); //~ ERROR wat
+    }
+}
+
+fn main() {
+    let o = Obj { member: 0 };
+    o.chirp();
+    1 + 1;
+}