Remove unnecessary reification from Kotlin R2DBC extensions #1496
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows calling the extensions from generic code that has erased types, for example:
I’m not sure what to do about tests. I could add new tests with erased types, but they would necessarily duplicate the existing tests that have reified types—and especially in
ReactiveSelectOperationExtensionsUnitTests
, that’s quite a lot of code; and the new tests would be verifying the same runtime behaviour as the old tests (as this change only affects compilability), so they’d become redundant. Alternatively, the existing tests could be tweaked to ensure the types are erased; or the ability to use erased types could go completely untested.I’m also not sure whether this is an ABI-compatible change. If not, I assume it will have to wait until a major-enough release where ABI breaks are allowed.