sebastianbergmann/type

Check Type::isAssignable() implementations with regard to nullability

Closed this issue · 2 comments

@stof wrote:

2 types allowing null are not automatically assignable to each other. Null is assignable to a type allowing null. And a type allowing null is not assignable to a type not allowing null. But ?string is not assignable to ?int

stof commented

Btw, infection pushing you to perform such changes and the testsuite accepting it seems to indicate that the test coverable of isAssignable is incomplete.

The changes that were prompted by Infection have been reverted. The isAssignable() implementation are now as they were. They likely still need more tests, but I'm closing this ticket now.