aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorLindsey Kuper <[email protected]>2011-03-29 15:51:53 -0700
committerLindsey Kuper <[email protected]>2011-03-29 15:59:15 -0700
commit55fbed3d8d7078bfd3864e64cc044cbe876c5d1a (patch)
tree3c0a53f8f59dbda781fda2a7ad1e5afcce719de2 /src/test/compile-fail
parentIgnore 'mutable foo' in plain field contexts. (diff)
downloadrust-55fbed3d8d7078bfd3864e64cc044cbe876c5d1a.tar.xz
rust-55fbed3d8d7078bfd3864e64cc044cbe876c5d1a.zip
Beginnings of support for magical self prefix; nothing profound happening yet.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/self-missing-method.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/compile-fail/self-missing-method.rs b/src/test/compile-fail/self-missing-method.rs
new file mode 100644
index 00000000..01c4ea14
--- /dev/null
+++ b/src/test/compile-fail/self-missing-method.rs
@@ -0,0 +1,13 @@
+// xfail-boot
+// error-pattern:expecting ., found (
+fn main() {
+
+ obj foo() {
+ fn m() {
+ self();
+ }
+ }
+
+ auto a = foo;
+ a.m();
+}