Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit 9029855

Browse files
committed
fix: empty vector ops fall through to caller for correct op-dependent type
1 parent 121d255 commit 9029855

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/ops/dispatch.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ ray_t* ray_binop_map(ray_binop_partial_fn partial, ray_t* x, ray_t* y) {
6969
len = x->len < y->len ? x->len : y->len; /* zip-map: truncate to shorter */
7070
else
7171
len = xv ? x->len : y->len;
72-
if (len == 0) {
73-
int8_t ot = infer_binop_type(x, y);
74-
return ray_vec_new(ot ? ot : RAY_I64, 0);
75-
}
72+
if (len == 0)
73+
return NULL; /* let caller handle — output type may be op-dependent */
7674

7775
/* Reject slices — ray_data() doesn't work on them */
7876
if (xv && (x->attrs & RAY_ATTR_SLICE)) return NULL;

0 commit comments

Comments
 (0)