Skip to content

Commit a2ab483

Browse files
committed
---
yaml --- r: 1266 b: refs/heads/master c: 35d53b7 h: refs/heads/master v: v3
1 parent ec885b8 commit a2ab483

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: d313e1579bd8a78a15cde9b17819aa7cfbf6f8c1
2+
refs/heads/master: 35d53b7eb17c17ac492aa67f843c94e8db1731e1

trunk/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ TEST_XFAILS_RUSTC := $(filter-out \
468468
simple-obj.rs \
469469
stateful-obj.rs \
470470
type-in-nested-module.rs \
471+
type-param.rs \
471472
tup.rs \
472473
u32-decr.rs \
473474
u8-incr.rs \

trunk/src/comp/middle/resolve.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ fn lookup_name_wrapped(&env e, ast.ident i) -> option.t[tup(@env, def_wrap)] {
305305
case (ast.item_mod(_, ?m, _)) {
306306
ret check_mod(i, m);
307307
}
308+
case (ast.item_ty(_, _, ?ty_params, _, _)) {
309+
for (ast.ty_param tp in ty_params) {
310+
if (_str.eq(tp.ident, i)) {
311+
auto t = ast.def_ty_arg(tp.id);
312+
ret some(def_wrap_other(t));
313+
}
314+
}
315+
}
308316
case (_) { /* fall through */ }
309317
}
310318
}
@@ -448,7 +456,6 @@ fn fold_view_item_import(&env e, &span sp,
448456
target_def));
449457
}
450458

451-
452459
fn fold_ty_path(&env e, &span sp, ast.path p, &option.t[def] d) -> @ast.ty {
453460

454461
let uint len = _vec.len[ast.ident](p.node.idents);

trunk/src/test/run-pass/type-param.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type lteq[T] = fn(&T a) -> bool;
2+
3+
fn main(vec[str] args) {
4+
5+
}

0 commit comments

Comments
 (0)