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.)
This commit is contained in:
Lindsey Kuper 2011-07-29 15:10:30 -07:00
parent 6423cc7b52
commit 7efbad674a

View File

@ -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,