mirror of
https://github.com/ziglang/zig.git
synced 2026-01-03 12:03:19 +00:00
Increment runtime_param_index for zero sized parameters
`runtime_param_index` is used to get the parameter type from `fn_type`, but this variable was not incremented for zero sized parameters, causing two zero sized parameters of different type to cause miss complication.
This commit is contained in:
parent
9d6bef49a5
commit
f78d3b27ca
@ -4437,6 +4437,7 @@ pub fn analyzeFnBody(mod: *Module, decl: *Decl, func: *Fn, arena: Allocator) Sem
|
||||
const arg = try sema.addConstant(param_type, opv);
|
||||
sema.inst_map.putAssumeCapacityNoClobber(inst, arg);
|
||||
total_param_index += 1;
|
||||
runtime_param_index += 1;
|
||||
continue;
|
||||
}
|
||||
const ty_ref = try sema.addType(param_type);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user