提交 d1b23669 编写于 作者: P Patrick Walton

rustc: Resolve type params

上级 76aab6b1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册