commit 8081e3cbc7f8b6af71dcbb88a12f6431b8be67be (tree)
parent c6b3d06535f4227541c13fe75da347a485abdb4f
Author: Matthew Borkowski <matthew.h.borkowski@gmail.com>
Date: Tue, 26 Oct 2021 18:21:29 -0400
astgen.zig: don't add scopes for extern functions params as they may shadow other names
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/AstGen.zig b/src/AstGen.zig
@@ -3147,7 +3147,7 @@ fn fnDecl(
break :param indexToRef(param_inst);
};
- if (param_name == 0) continue;
+ if (param_name == 0 or is_extern) continue;
const sub_scope = try astgen.arena.create(Scope.LocalVal);
sub_scope.* = .{