Operator ‘+’ cannot be applied to types ‘T’ and ‘U’ despite both T and U are same when calling function [duplicate]
Everything described so far is the intended behavior. Not inferring union types from disparate candidates is 100% intentional; this doesn’t yield expected results in a huge majority of cases even though it can be theoretically justified.