From 7b4190d4e93dca3bb4a593491f1df5e2512156f8 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 10 Jul 2012 20:53:49 -0700 Subject: [PATCH] Test for issue 2735 This probably doesn't test the actual bug, but the fix for issue 2734 probably camouflages the actual bug (since the effect of the #2734 test case is now "do nothing observable" rather than "segfault"). Closes #2735 --- src/test/run-pass/issue-2735.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/run-pass/issue-2735.rs diff --git a/src/test/run-pass/issue-2735.rs b/src/test/run-pass/issue-2735.rs new file mode 100644 index 000000000000..d896473d20f5 --- /dev/null +++ b/src/test/run-pass/issue-2735.rs @@ -0,0 +1,14 @@ +iface hax { } +impl of hax for A { } + +fn perform_hax(x: @T) -> hax { + x as hax +} + +fn deadcode() { + perform_hax(@"deadcode"); +} + +fn main() { + perform_hax(@42); +}