Skip to content

Commit f0d8e97

Browse files
committed
Add test for #2633. Xfailed.
1 parent 6e63e2f commit f0d8e97

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Currently segfaults
2+
// xfail-test
3+
class cat {
4+
let mut meow: fn@();
5+
new() { self.meow = fn@() { #error("meow"); };}
6+
}
7+
8+
type kitty_info = {kitty: cat};
9+
10+
// Code compiles and runs successfully if we add a + before the first arg
11+
fn nyan(kitty: cat, _kitty_info: kitty_info) {
12+
kitty.meow();
13+
}
14+
15+
fn main() {
16+
let mut kitty = cat();
17+
nyan(kitty, {kitty: kitty});
18+
}

0 commit comments

Comments
 (0)