From 7efbad674ab1cdec36af3143d7b64baa5133b067 Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Fri, 29 Jul 2011 15:10:30 -0700 Subject: [PATCH] Don't confuse backwards and forwards. Oops. If we already have a backwarding vtable, that means that we are currently building a forwarding fn. (Progress toward issue #702.) --- src/comp/middle/trans.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 8985193de867..8c11d1b960eb 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -6524,10 +6524,14 @@ fn process_fwding_mthd(cx: @local_ctxt, sp: &span, m: @ty::method, let mcx: @local_ctxt = @{path: cx.path + ~["method", m.ident] with *cx}; // Make up a name for the forwarding function. - let fn_name: str; + let fn_name: str = ""; alt (backwarding_vtbl) { - none. { fn_name = "forwarding_fn"; } - some(_) { fn_name = "backwarding_fn"; } + // NB: If we have a backwarding_vtbl, that *doesn't* mean that we're + // currently processing a backwarding fn. It's the opposite: it means + // that we have already processed them, and now we're creating + // forwarding fns that *use* a vtable full of them. + none. { fn_name = "backwarding_fn"; } + some(_) { fn_name = "forwarding_fn"; } } let s: str = mangle_internal_name_by_path_and_seq(mcx.ccx, mcx.path,