69fba8d33b
Before this change `ARGUMENT_TYPE_MISMATCH` would complain that `Y` "is not a subtype of" `Inv<Y>`, because the function would only check immediate bounds of the type parameter `Y`. `chosenSupertype` would be `X`, not `Inv<out kotlin/String>`. ^KT-60056