std.builtin: rename Type.Fn's args to params
This was a poor naming choice; these are parameters, not arguments. Parameters specify what kind of arguments are expected, whereas the arguments are the actual values passed.
This commit is contained in:
@@ -9,10 +9,10 @@ test "reflection: function return type, var args, and param types" {
|
||||
const info = @typeInfo(@TypeOf(dummy)).Fn;
|
||||
try expect(info.return_type.? == i32);
|
||||
try expect(!info.is_var_args);
|
||||
try expect(info.args.len == 3);
|
||||
try expect(info.args[0].type.? == bool);
|
||||
try expect(info.args[1].type.? == i32);
|
||||
try expect(info.args[2].type.? == f32);
|
||||
try expect(info.params.len == 3);
|
||||
try expect(info.params[0].type.? == bool);
|
||||
try expect(info.params[1].type.? == i32);
|
||||
try expect(info.params[2].type.? == f32);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user