mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 01:44:36 +00:00
Remove simd_rem; Disallow simd_div for integers
This commit is contained in:
@@ -1618,6 +1618,9 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) {
|
||||
if (is_type_matrix(main_type)) {
|
||||
error(op, "Operator '%.*s' is only allowed with matrix types", LIT(op.string));
|
||||
return false;
|
||||
} else if (is_type_simd_vector(main_type) && is_type_integer(type)) {
|
||||
error(op, "Operator '%.*s' is only allowed with #simd types with integer elements", LIT(op.string));
|
||||
return false;
|
||||
}
|
||||
/*fallthrough*/
|
||||
case Token_Mul:
|
||||
@@ -1669,6 +1672,9 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) {
|
||||
if (!is_type_integer(type)) {
|
||||
error(op, "Operator '%.*s' is only allowed with integers", LIT(op.string));
|
||||
return false;
|
||||
} else if (is_type_simd_vector(main_type)) {
|
||||
error(op, "Operator '%.*s' is only allowed with #simd types with integer elements", LIT(op.string));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user