Skip to content

Commit

Permalink
Add test for #2633. Xfailed.
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Jun 16, 2012
1 parent 6e63e2f commit f0d8e97
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/run-pass/issue-2633.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Currently segfaults
// xfail-test
class cat {
let mut meow: fn@();
new() { self.meow = fn@() { #error("meow"); };}
}

type kitty_info = {kitty: cat};

// Code compiles and runs successfully if we add a + before the first arg
fn nyan(kitty: cat, _kitty_info: kitty_info) {
kitty.meow();
}

fn main() {
let mut kitty = cat();
nyan(kitty, {kitty: kitty});
}

0 comments on commit f0d8e97

Please sign in to comment.