mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.HashMap: fix getPtrAdapted. AstGen: fix fn param iteration
There was a bug in stage2 regarding iteration of function parameter AST. This resulted in a false negative "unused parameter" compile error, which, when fixed, revealed a bug in the std lib HashMap implementation.
This commit is contained in:
parent
c03a04a589
commit
47f2463b5c
2 changed files with 4 additions and 1 deletions
|
|
@ -563,7 +563,7 @@ pub fn HashMap(
|
|||
return self.unmanaged.getPtrContext(key, self.ctx);
|
||||
}
|
||||
pub fn getPtrAdapted(self: Self, key: anytype, ctx: anytype) ?*V {
|
||||
return self.unmanaged.getPtrAdapted(key, self.ctx);
|
||||
return self.unmanaged.getPtrAdapted(key, ctx);
|
||||
}
|
||||
|
||||
/// Finds the key and value associated with a key in the map
|
||||
|
|
|
|||
|
|
@ -2198,6 +2198,9 @@ pub const full = struct {
|
|||
.type_expr = param_type,
|
||||
};
|
||||
}
|
||||
if (token_tags[it.tok_i] == .comma) {
|
||||
it.tok_i += 1;
|
||||
}
|
||||
if (token_tags[it.tok_i] == .r_paren) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue