diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-02-05 17:04:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-05 17:04:40 -0500 |
| commit | 80ae434b6686f44c98baa7c404131aefd136b977 (patch) | |
| tree | ba89f99ec9f9d82da0216ee756ba8316a90aeda7 /src/ir.cpp | |
| parent | 378d733439a574cc7b961f1d6a09167479225da8 (diff) | |
| parent | 8c55c4550a7f79d732f0d2ffbf0455b058ab5aad (diff) | |
| download | zig-80ae434b6686f44c98baa7c404131aefd136b977.tar.gz zig-80ae434b6686f44c98baa7c404131aefd136b977.zip | |
Merge pull request #4397 from LemonBoy/fixes
Fixes
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index ef3426d111..0687d18ef2 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -11864,7 +11864,7 @@ static ConstCastOnly types_match_const_cast_only(IrAnalyze *ira, ZigType *wanted } assert(wanted_type->data.fn.is_generic || wanted_type->data.fn.fn_type_id.next_param_index == wanted_type->data.fn.fn_type_id.param_count); - for (size_t i = 0; i < wanted_type->data.fn.fn_type_id.next_param_index; i += 1) { + for (size_t i = 0; i < wanted_type->data.fn.fn_type_id.param_count; i += 1) { // note it's reversed for parameters FnTypeParamInfo *actual_param_info = &actual_type->data.fn.fn_type_id.param_info[i]; FnTypeParamInfo *expected_param_info = &wanted_type->data.fn.fn_type_id.param_info[i]; @@ -30285,7 +30285,7 @@ static ZigType *ir_resolve_lazy_fn_type(IrAnalyze *ira, AstNode *source_node, La if (param_is_var_args) { if (fn_type_id.cc == CallingConventionC) { fn_type_id.param_count = fn_type_id.next_param_index; - continue; + break; } else if (fn_type_id.cc == CallingConventionUnspecified) { return get_generic_fn_type(ira->codegen, &fn_type_id); } else { |
