aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/member_function_arg_mismatch.zig
blob: 901a53522057be79cbd4126fb211ef49f79ec1d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
const S = struct {
    a: u32,
    fn foo(_: *S, _: u32, _: bool) void {}
};
pub export fn entry() void {
    var s: S = undefined;
    s.foo(true);
}

// error
//
// :7:6: error: member function expected 2 argument(s), found 1
// :3:5: note: function declared here