This might involve digging in the typechecker a bit; it'd be good for these to
work:
let vec[T] v = ...;
let T t = ...;
v += t;
and
let str s = "hi";
s += 'x';
At the moment both the typechecker and the backend prefer to think of operator
- as only applying to identical-typed values. Which is usually good. This is
just an exceptional case that might be good to provide support for.
For the time being we can fake it using a single-element temporary vec or a
single-char string. It's just kinda lame. But this is a lower-priority bug.
This might involve digging in the typechecker a bit; it'd be good for these to
work:
let vec[T] v = ...;
let T t = ...;
v += t;
and
let str s = "hi";
s += 'x';
At the moment both the typechecker and the backend prefer to think of operator
just an exceptional case that might be good to provide support for.
For the time being we can fake it using a single-element temporary vec or a
single-char string. It's just kinda lame. But this is a lower-priority bug.