Skip to content

add a compile error note for field name shadowing struct member function #705

Description

@andrewrk
constxxx=struct {
bar: u8,
pubfnbar(self: *constxxx) void {}
};
pubfnmain() !void {
varx: xxx=undefined;
x.bar();
}
O:\zig0.1.1\b.zig:10:4: error: type 'u8' not a function
x.bar();
^

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.frontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions