I'd prefer it to be called
invalid operand type(s) float and int32 for operator +
The current error message follows Python's:
TypeError: unsupported operand type(s) for +: 'float' and…
Also I don't think From
trait is meant to be used like that - it's purpose is for type conversions. Perhaps I will create a trait HasOpInfo
.
CallInfo
was intended to be general for any kind of function call. But to be honest I cannot think of anything other than normal function calls and operator calls (including is
and is not
…
It is possible for Cmpop
and Unaryop
, but not for Operator
(binary operator) since it takes an extra argument, although I could create:
struct BinaryOp {
base_op: Operator,
…
unify_call()
has imprecise error report.
Further revision and squashed history.
For now I would replace the message to be Expected list literal, tuple, or int32 for argument {arg_num} of {id} at {location}. Input argument is of type list but not written as a list literal.
I am not entirely sure what "compile-time constants" means exactly. I guess that means a "static"-ishly defined value. shape
need not to be a compile-time constant for tuple
and int32
in my…
I am not entirely sure what "compile-time constants" means exactly. I guess that means a "static"-ishly defined value. shape
need not to be a compile-time constant for tuple
and int32
in my…
Force-pushed to rebase onto master since M-Labs/nac3#437 has been merged.