mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Fix min, max, clamp final type bug
This commit is contained in:
@@ -3959,6 +3959,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
|
|||||||
Type *bt = base_type(operands[0].type);
|
Type *bt = base_type(operands[0].type);
|
||||||
if (are_types_identical(bt, t_f32)) add_package_dependency(c, "runtime", "min_f32");
|
if (are_types_identical(bt, t_f32)) add_package_dependency(c, "runtime", "min_f32");
|
||||||
if (are_types_identical(bt, t_f64)) add_package_dependency(c, "runtime", "min_f64");
|
if (are_types_identical(bt, t_f64)) add_package_dependency(c, "runtime", "min_f64");
|
||||||
|
|
||||||
|
operand->type = operands[0].type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -4119,6 +4121,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
|
|||||||
Type *bt = base_type(operands[0].type);
|
Type *bt = base_type(operands[0].type);
|
||||||
if (are_types_identical(bt, t_f32)) add_package_dependency(c, "runtime", "max_f32");
|
if (are_types_identical(bt, t_f32)) add_package_dependency(c, "runtime", "max_f32");
|
||||||
if (are_types_identical(bt, t_f64)) add_package_dependency(c, "runtime", "max_f64");
|
if (are_types_identical(bt, t_f64)) add_package_dependency(c, "runtime", "max_f64");
|
||||||
|
|
||||||
|
operand->type = operands[0].type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -4266,6 +4270,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
|
|||||||
add_package_dependency(c, "runtime", "min_f64");
|
add_package_dependency(c, "runtime", "min_f64");
|
||||||
add_package_dependency(c, "runtime", "max_f64");
|
add_package_dependency(c, "runtime", "max_f64");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
operand->type = ops[0]->type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user