Skip to content

Commit ab0de5b

Browse files
committed
---
yaml --- r: 922 b: refs/heads/master c: c410d68 h: refs/heads/master v: v3
1 parent ac1d934 commit ab0de5b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3352fab59ba39194b2efd7e478aa1fbbfe0de8d1
2+
refs/heads/master: c410d685294e73a944f3e7cfe403f415a0cff849

trunk/src/boot/me/trans.ml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,8 +2578,13 @@ let trans_visitor
25782578
in
25792579
match expr with
25802580
Ast.EXPR_binary (binop, a, b) ->
2581-
assert (is_prim_type (simplified_ty (atom_type cx a)));
2582-
assert (is_prim_type (simplified_ty (atom_type cx b)));
2581+
if not (is_prim_type (simplified_ty (atom_type cx a))) ||
2582+
not (is_prim_type (simplified_ty (atom_type cx b))) then
2583+
unimpl None "application of binary operator %a to operands of \
2584+
type %s and %s"
2585+
Ast.sprintf_binop binop
2586+
(pretty_ty_str cx (Ast.sprintf_ty ()) (atom_type cx a))
2587+
(pretty_ty_str cx (Ast.sprintf_ty ()) (atom_type cx b));
25832588
trans_binary binop (trans_atom a) (trans_atom b)
25842589

25852590
| Ast.EXPR_unary (unop, a) ->

0 commit comments

Comments
 (0)