Skip to content

Instantly share code, notes, and snippets.

@msullivan
Last active December 19, 2015 00:59
Show Gist options
  • Save msullivan/5872695 to your computer and use it in GitHub Desktop.
Save msullivan/5872695 to your computer and use it in GitHub Desktop.
I
// XXX: this is *completely* bad and wrong. I feel bad. Handling
// of vtables is currently bogus for default methods, and changing
// to an unflattented representation of vtables causes this to
// show up in cases that it did not previously. We need to make
// the vtables list be the same length as the substs.
// This is nothing right about this. I really need to emphasize just
// how wrong it is: it is completely wrong.
// XXX: bad. -sully
let vtables = do vtables.map |vtbls| {
if vtbls.len() < substs.tps.len() {
@(vec::from_elem(substs.tps.len() - vtbls.len(), @~[]) +
**vtbls)
} else if vtbls.len() > substs.tps.len() {
@vec::tailn(**vtbls, vtbls.len() - substs.tps.len()).to_owned()
} else {
*vtbls
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment