aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot/me/trans.ml9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index c3d5240b..58cccb99 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -2578,8 +2578,13 @@ let trans_visitor
in
match expr with
Ast.EXPR_binary (binop, a, b) ->
- assert (is_prim_type (simplified_ty (atom_type cx a)));
- assert (is_prim_type (simplified_ty (atom_type cx b)));
+ if not (is_prim_type (simplified_ty (atom_type cx a))) ||
+ not (is_prim_type (simplified_ty (atom_type cx b))) then
+ unimpl None "application of binary operator %a to operands of \
+ type %s and %s"
+ Ast.sprintf_binop binop
+ (pretty_ty_str cx (Ast.sprintf_ty ()) (atom_type cx a))
+ (pretty_ty_str cx (Ast.sprintf_ty ()) (atom_type cx b));
trans_binary binop (trans_atom a) (trans_atom b)
| Ast.EXPR_unary (unop, a) ->