astgen.zig: don't add scopes for extern functions params as they may shadow other names

This commit is contained in:
Matthew Borkowski 2021-10-26 18:21:29 -04:00
parent c6b3d06535
commit 8081e3cbc7

View File

@ -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.* = .{