Skip to content

Commit 0043f99

Browse files
committed
Teach resolve about ty params on tags.
1 parent 0ebfb82 commit 0043f99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/comp/middle/resolve.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,14 @@ fn lookup_name_wrapped(&env e, ast.ident i) -> option.t[tup(@env, def_wrap)] {
353353
}
354354
}
355355
}
356+
case (ast.item_tag(_, _, ?ty_params, _)) {
357+
for (ast.ty_param tp in ty_params) {
358+
if (_str.eq(tp.ident, i)) {
359+
auto t = ast.def_ty_arg(tp.id);
360+
ret some(def_wrap_other(t));
361+
}
362+
}
363+
}
356364
case (ast.item_mod(_, ?m, _)) {
357365
ret check_mod(i, m);
358366
}

0 commit comments

Comments
 (0)