Use the Nth impl when translating a static method call, instead

of the 0th.  0th is only correct when there are no bound tps
on the trait.

Fixes #3741.
This commit is contained in:
Niko Matsakis
2012-10-12 17:00:08 -07:00
parent 57b4d10ff6
commit cb55e246ba
11 changed files with 122 additions and 43 deletions

View File

@@ -54,7 +54,7 @@ fn variant_def_ids(d: def) -> {enm: def_id, var: def_id} {
pure fn def_id_of_def(d: def) -> def_id {
match d {
def_fn(id, _) | def_static_method(id, _) | def_mod(id) |
def_fn(id, _) | def_static_method(id, _, _) | def_mod(id) |
def_foreign_mod(id) | def_const(id) |
def_variant(_, id) | def_ty(id) | def_ty_param(id, _) |
def_use(id) | def_class(id, _) => {