From a8a4d4ec056b68ac25a04ea020cdc674527a76df Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 10 Aug 2011 15:57:03 -0700 Subject: Use actual type, not declared type, when zeroing move arguments trans was failing with a bounds check error because the caller was using the declared type (an out-of-scope ty param) and not the actual type in a list of argument types to zero. Closes #811 --- src/test/run-fail/bug-811.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/run-fail/bug-811.rs (limited to 'src/test/run-fail') diff --git a/src/test/run-fail/bug-811.rs b/src/test/run-fail/bug-811.rs new file mode 100644 index 00000000000..2ecf7a7c29e --- /dev/null +++ b/src/test/run-fail/bug-811.rs @@ -0,0 +1,16 @@ +// error-pattern:quux +fn test00_start(ch: chan_t[int], message: int) { + send(ch, message); +} + +type task_id = int; +type port_id = int; + +type chan_t[~T] = { + task : task_id, + port : port_id +}; + +fn send[~T](ch : chan_t[T], data : -T) { fail; } + +fn main() { fail "quux"; } -- cgit 1.4.1-3-g733a5