Skip to content

Commit a33bc56

Browse files
committed
Reduced test case for issue #540.
1 parent a0c6d0a commit a33bc56

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//xfail-stage0
2+
//xfail-stage1
3+
//xfail-stage2
4+
5+
// Reduced test case for issue #540.
6+
fn main() {
7+
obj a() {
8+
fn foo() -> int {
9+
ret 2;
10+
}
11+
}
12+
13+
auto my_a = a();
14+
auto my_b = obj {
15+
fn baz() -> int {
16+
ret self.foo();
17+
}
18+
with my_a
19+
};
20+
21+
assert (my_b.baz() == 2);
22+
}

0 commit comments

Comments
 (0)