3 ms·
OP's code only works because the method goes from T? to T. If it accepted T and returned T?, he would've gotten an error like this: CS0111: Type 'Utils' alr
by orthoxerox 1y ago
OP's code only works because the method goes from T? to T. If it accepted T and returned T?, he would've gotten an error like this:
CS0111: Type 'Utils' already defines a member called 'Foo' with the same parameter types
That's because the "type constraints are part of the signature of the method and there is no ambiguity" statement is wrong. They are not.