We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c00bda5 commit 6d92ca6Copy full SHA for 6d92ca6
src/comp/middle/trans.rs
@@ -273,6 +273,19 @@ fn type_of(@trans_ctxt cx, @typeck.ty t) -> TypeRef {
273
}
274
ret T_struct(tys);
275
276
+ case (typeck.ty_fn(?args, ?out)) {
277
+ let vec[TypeRef] atys = vec();
278
+ for (typeck.arg arg in args) {
279
+ let TypeRef t = type_of(cx, arg.ty);
280
+ alt (arg.mode) {
281
+ case (ast.alias) {
282
+ t = T_ptr(t);
283
+ }
284
285
+ atys += t;
286
287
+ ret T_fn(atys, type_of(cx, out));
288
289
case (typeck.ty_var(_)) {
290
// FIXME: implement.
291
log "ty_var in trans.type_of";
0 commit comments