diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-06-15 17:32:59 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-06-15 17:33:35 -0700 |
| commit | f0d8e978a94efe228e2ce9ca89bb4044be040c04 (patch) | |
| tree | 99695df130c69a3999dc586ce600681ea5e3b406 /src | |
| parent | 6e63e2fd5f4b081c706edc9f3fa1f6c02fab21c7 (diff) | |
| download | rust-f0d8e978a94efe228e2ce9ca89bb4044be040c04.tar.gz rust-f0d8e978a94efe228e2ce9ca89bb4044be040c04.zip | |
Add test for #2633. Xfailed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/issue-2633.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-2633.rs b/src/test/run-pass/issue-2633.rs new file mode 100644 index 00000000000..b3b7649536a --- /dev/null +++ b/src/test/run-pass/issue-2633.rs @@ -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}); +} \ No newline at end of file |
