mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-15 10:22:23 -07:00
Disallow ambiguous singularly variadic polymorphic parameters #361
This commit is contained in:
@@ -1570,6 +1570,12 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is
|
||||
if (operands != nullptr && variables.count < operands->count) {
|
||||
|
||||
Operand op = (*operands)[variables.count];
|
||||
if (op.expr == nullptr) {
|
||||
// NOTE(bill): 2019-03-30
|
||||
// This is just to add the error message to determine_type_from_polymorphic which
|
||||
// depends on valid position information
|
||||
op.expr = _params;
|
||||
}
|
||||
if (is_type_polymorphic_type) {
|
||||
type = determine_type_from_polymorphic(ctx, type, op);
|
||||
if (type == t_invalid) {
|
||||
|
||||
Reference in New Issue
Block a user