diff options
| author | gingerBill <bill@gingerbill.org> | 2019-02-23 21:39:47 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-02-23 21:39:47 +0000 |
| commit | e551d2b25ea39afb95f7b8ee4309ef0cc8b502b8 (patch) | |
| tree | 664e1906ba18e2d7d1fdb64915c54c1d10b4536d /src/check_expr.cpp | |
| parent | 38ae2e9efaf8d227a138d749085599e7ee9fde54 (diff) | |
Replace `foreign export {}` with `@export`
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 75c16b705..ea125a5eb 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1241,6 +1241,14 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) { error(op, "Operator '%.*s' is only allowed with integers", LIT(op.string)); return false; } + if (is_type_simd_vector(o->type)) { + switch (op.kind) { + case Token_ModMod: + case Token_ModModEq: + error(op, "Operator '%.*s' is only allowed with integers", LIT(op.string)); + return false; + } + } break; case Token_AndNot: @@ -1249,6 +1257,14 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) { error(op, "Operator '%.*s' is only allowed with integers and bit sets", LIT(op.string)); return false; } + if (is_type_simd_vector(o->type)) { + switch (op.kind) { + case Token_AndNot: + case Token_AndNotEq: + error(op, "Operator '%.*s' is only allowed with integers", LIT(op.string)); + return false; + } + } break; case Token_CmpAnd: |