Skip to content

Commit 336949a

Browse files
committed
Test case for issue #718.
1 parent 5691d15 commit 336949a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/test/run-pass/issue-718.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//xfail-stage0
2+
//xfail-stage1
3+
//xfail-stage2
4+
5+
fn main() {
6+
7+
obj a() {
8+
fn foo() -> int {
9+
ret 2;
10+
}
11+
}
12+
13+
auto my_a = a();
14+
15+
auto my_b = obj() {
16+
with my_a
17+
};
18+
19+
assert (my_b.foo() == 2);
20+
21+
auto my_c = obj() {
22+
with my_b
23+
};
24+
25+
assert (my_c.foo() == 2);
26+
}
27+

0 commit comments

Comments
 (0)