Skip to content

Commit 51b27aa

Browse files
committed
---
yaml --- r: 1487 b: refs/heads/master c: c19e4e1 h: refs/heads/master i: 1485: abc383c 1483: d46bb2c 1479: 7743b24 1471: 916d26d v: v3
1 parent de0cba9 commit 51b27aa

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
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: fc722b17c92a91853f75c31e05b9a50d45fbe5e9
2+
refs/heads/master: c19e4e1c2987383ef686ca831f8115a1179ecb40

trunk/src/comp/middle/trans.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,22 @@ fn type_of_inner(@crate_ctxt cx, @ty.t t) -> TypeRef {
621621
}
622622

623623
fn type_of_arg(@crate_ctxt cx, &ty.arg arg) -> TypeRef {
624-
auto ty = type_of_inner(cx, arg.ty);
624+
alt (arg.ty.struct) {
625+
case (ty.ty_param(_)) {
626+
if (arg.mode == ast.alias) {
627+
ret T_typaram_ptr(cx.tn);
628+
}
629+
}
630+
case (_) {
631+
// fall through
632+
}
633+
}
634+
635+
auto typ = type_of_inner(cx, arg.ty);
625636
if (arg.mode == ast.alias) {
626-
ty = T_ptr(ty);
637+
typ = T_ptr(typ);
627638
}
628-
ret ty;
639+
ret typ;
629640
}
630641

631642
// Name sanitation. LLVM will happily accept identifiers with weird names, but

0 commit comments

Comments
 (0)