Last active
December 19, 2015 00:59
-
-
Save msullivan/5872695 to your computer and use it in GitHub Desktop.
I
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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