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

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