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 1cd95d2 commit febcc81Copy full SHA for febcc81
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 336949a5908c27759b3bce0bb6678860d63eb047
+refs/heads/master: 431cb9a3454fe19fe6987aebb3b3655dc9eca8ad
trunk/src/test/run-pass/anon-obj-overriding.rs
@@ -26,4 +26,21 @@ fn main() {
26
27
assert (my_b.foo() == 3);
28
assert (my_b.bar() == 3);
29
+
30
+ auto my_c = obj() {
31
+ fn baz(int x, int y) -> int {
32
+ ret x + y + self.foo();
33
+ }
34
+ with my_b
35
+ };
36
37
+ auto my_d = obj() {
38
39
40
41
+ with my_a
42
43
44
+ assert (my_c.baz(1, 2) == 6);
45
+ assert (my_d.baz(1, 2) == 5);
46
}
0 commit comments