rustc: Resolve type params

This commit is contained in:
Patrick Walton 2010-12-15 13:12:39 -08:00
parent 76aab6b1a8
commit d1b2366983

View File

@ -103,12 +103,17 @@ fn in_scope(ast.ident i, &scope s) -> option.t[def] {
case (scope_item(?it)) {
alt (it.node) {
case (ast.item_fn(_, ?f, _, _, _)) {
case (ast.item_fn(_, ?f, ?ty_params, _, _)) {
for (ast.arg a in f.inputs) {
if (_str.eq(a.ident, i)) {
ret some[def](ast.def_arg(a.id));
}
}
for (ast.ty_param tp in ty_params) {
if (_str.eq(tp.ident, i)) {
ret some[def](ast.def_ty_arg(tp.id));
}
}
}
case (ast.item_mod(_, ?m, _)) {
ret check_mod(i, m);