mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Add basic type inference to the arguments
This commit is contained in:
@@ -4888,7 +4888,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
|||||||
case BuiltinProc_concatenate: {
|
case BuiltinProc_concatenate: {
|
||||||
Operand lhs = {};
|
Operand lhs = {};
|
||||||
|
|
||||||
check_expr(c, &lhs, ce->args[0]);
|
check_expr_with_type_hint(c, &lhs, ce->args[0], type_hint);
|
||||||
if (lhs.mode == Addressing_Invalid) {
|
if (lhs.mode == Addressing_Invalid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4930,7 +4930,7 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
|||||||
|
|
||||||
for (isize i = 1; i < ce->args.count; i++) {
|
for (isize i = 1; i < ce->args.count; i++) {
|
||||||
Operand extra = {};
|
Operand extra = {};
|
||||||
check_expr(c, &extra, ce->args[i]);
|
check_expr_with_type_hint(c, &extra, ce->args[i], lhs.type);
|
||||||
if (extra.mode == Addressing_Invalid) {
|
if (extra.mode == Addressing_Invalid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user