Skip to content

Commit 9ac7ae0

Browse files
committed
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.
1 parent a6d0a1f commit 9ac7ae0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Module.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4437,6 +4437,7 @@ pub fn analyzeFnBody(mod: *Module, decl: *Decl, func: *Fn, arena: Allocator) Sem
44374437
const arg = try sema.addConstant(param_type, opv);
44384438
sema.inst_map.putAssumeCapacityNoClobber(inst, arg);
44394439
total_param_index += 1;
4440+
runtime_param_index += 1;
44404441
continue;
44414442
}
44424443
const ty_ref = try sema.addType(param_type);

0 commit comments

Comments
 (0)