edgedb-js
edgedb-js copied to clipboard
Fix `anyscalar` behavior in query builder
In EdgeQL, anyscalar is a kind of generic that binds other usages to the same concrete type when applied rather than being a union of all scalar types as the name implies (and as we're currently treating it).
So, when we have a function or operator that uses anyscalar for two or more operands/arguments, the actual type is constrained as if all arguments agree on the instance of the generic. So more like:
function eq<T extends scalar>(l: T, r: T);
instead of
function eq(l: scalar, r: scalar);
// or
function eq<T extends scalar, U extends scalar>(l: T, r: U);