Skip to content

Show signature of function pointers where possible #3243

Description

@Tetralux
const std = @import("std");

pub fn main() !void {
    var a = std.debug.global_allocator;
    var bytes = a.alloc(u8, 1);
    bytes = a.reallocFn(a, bytes, 1, 2);
}
 error: expected 5 arguments, found 4
    bytes = a.reallocFn(a, bytes, 1, 2);
                       ^
path\to\zig\lib\zig\std\special\start.zig:184:40: note: referenced here
            const result = root.main() catch |err| {
                                       ^

This does not show the signature of reallocFn, which it should.
Not sure if this also happens if it's just in a different file or not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.error messageThis issue points out an error message that is unhelpful and should be improved.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions