We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f47ef26 commit b332a79Copy full SHA for b332a79
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 6affa3264b6e1bb6dec39b0393c9b0f4df9df7b4
+refs/heads/master: b23360ec8e58277a5e1685df60c02399522a5e58
trunk/src/test/run-pass/anon-obj-no-inner-obj.rs
@@ -0,0 +1,19 @@
+//xfail-stage1
+//xfail-stage2
3
+//xfail-stage3
4
+use std;
5
+
6
+// Should we support this? See issue #812.
7
8
+fn main() {
9
10
+ // Anonymous object that doesn't extend an existing one.
11
+ let my_obj = obj () {
12
+ fn foo() -> int { ret 2; }
13
+ fn bar() -> int { ret self.foo(); }
14
+ };
15
16
+ assert (my_obj.foo() == 2);
17
+ assert (my_obj.bar() == 2);
18
19
+}
0 commit comments