Commit 8081e3cbc7

Matthew Borkowski <matthew.h.borkowski@gmail.com>
2021-10-27 00:21:29
astgen.zig: don't add scopes for extern functions params as they may shadow other names
1 parent c6b3d06
Changed files (1)
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.* = .{