diff options
| author | Matthew Borkowski <matthew.h.borkowski@gmail.com> | 2021-10-26 18:21:29 -0400 |
|---|---|---|
| committer | Matthew Borkowski <matthew.h.borkowski@gmail.com> | 2021-10-26 18:21:29 -0400 |
| commit | 8081e3cbc7f8b6af71dcbb88a12f6431b8be67be (patch) | |
| tree | ff6e790a4286100fc3939cd474db7c70acd4128d /src | |
| parent | c6b3d06535f4227541c13fe75da347a485abdb4f (diff) | |
| download | zig-8081e3cbc7f8b6af71dcbb88a12f6431b8be67be.tar.gz zig-8081e3cbc7f8b6af71dcbb88a12f6431b8be67be.zip | |
astgen.zig: don't add scopes for extern functions params as they may shadow other names
Diffstat (limited to 'src')
| -rw-r--r-- | src/AstGen.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 3fd3da6bb6..509880ec95 100644 --- 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.* = .{ |
