Skip to content

Commit 0ba85ea

Browse files
committed
std.zig.parser fixed segfault when parsing cc for fn decl
1 parent c6aa637 commit 0ba85ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/zig/parser.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ pub const Parser = struct {
417417
},
418418
Token.Id.Keyword_nakedcc, Token.Id.Keyword_stdcallcc => {
419419
// TODO shouldn't need this cast
420-
const fn_proto = try self.createAttachFnProto(arena, ctx.decls, undefined,
420+
const fn_proto = try self.createAttachFnProto(arena, ctx.decls, Token(undefined),
421421
ctx.extern_token, ctx.lib_name, (?Token)(token), (?Token)(null), (?Token)(null));
422422
stack.append(State { .FnDef = fn_proto }) catch unreachable;
423423
try stack.append(State { .FnProto = fn_proto });

0 commit comments

Comments
 (0)