Skip to content

Commit

Permalink
Don't confuse backwards and forwards.
Browse files Browse the repository at this point in the history
Oops.  If we already have a backwarding vtable, that means that we are
currently building a forwarding fn.  (Progress toward issue #702.)
  • Loading branch information
lkuper committed Jul 29, 2011
1 parent 6423cc7 commit 7efbad6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/comp/middle/trans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7efbad6

Please sign in to comment.