typedef DistinctInt = inline int;
fn int main()
{
int a = 1;
DistinctInt b = 2;
int c = a + b; // Error: Implicitly casting 'int' to 'DistinctInt' is not permitted, but you may do an explicit cast by placing '(DistinctInt)' before the expression.
return 0;
}
it seems like b should be automatically converted to an int, or at least that the error message should say to cast b to an int since the expression is being assigned to another int.
I remember there being some issues with operators and typedef inline, is this a situation where an operator should be defined explicitly?