| author | |
| committer | |
| log | f78d3b27ca1bea33c92e2f8eae84589db28c06cb |
| tree | 5e5aa6fe451413a35173ad68bc87b85e999fb5c2 |
| parent | 9d6bef49a5fc2a5387734fa8d8cc698f0da8d5fa |
`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 files changed, 1 insertions(+), 0 deletions(-)
src/Module.zig+1| ... | ... | @@ -4437,6 +4437,7 @@ pub fn analyzeFnBody(mod: *Module, decl: *Decl, func: *Fn, arena: Allocator) Sem |
| 4437 | 4437 | const arg = try sema.addConstant(param_type, opv); |
| 4438 | 4438 | sema.inst_map.putAssumeCapacityNoClobber(inst, arg); |
| 4439 | 4439 | total_param_index += 1; |
| 4440 | runtime_param_index += 1; | |
| 4440 | 4441 | continue; |
| 4441 | 4442 | } |
| 4442 | 4443 | const ty_ref = try sema.addType(param_type); |