diff options
| author | gingerBill <bill@gingerbill.org> | 2017-10-15 10:09:50 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-10-15 10:09:50 +0100 |
| commit | b3b688fa502c18c7892c5dfb37a2fc43727d26fc (patch) | |
| tree | 9366c378bbff6bb740a4e0795b4fd99b23b6d018 /src/check_type.cpp | |
| parent | 5eaa8de8f94a8f5601ba0a4267f210ce5ae4ddc8 (diff) | |
Fix issue #123
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 07f20b3af..e6cddf62e 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1475,7 +1475,8 @@ Type *check_get_params(Checker *c, Scope *scope, AstNode *_params, bool *is_vari param = make_entity_type_name(c->allocator, scope, name->Ident.token, type); param->TypeName.is_type_alias = true; } else { - if (operands != nullptr && is_type_polymorphic_type) { + if (operands != nullptr && is_type_polymorphic_type && + operands->count > variables.count) { Operand op = (*operands)[variables.count]; type = determine_type_from_polymorphic(c, type, op); if (type == t_invalid) { |