ContentResultMatchersDsl's matchers too strict #34494
Labels
in: test
Issues in the test module
status: waiting-for-triage
An issue we've not yet triaged or decided on
theme: kotlin
An issue related to Kotlin support
In
ContentResultMatchersDsl
, the functions that accept aMatcher
don't allow matchers for supertypes of the checked type. This causes code liketo not compile, since
hasLength
is aMatcher<CharSequence>
andstring
wants aMatcher<String>
. The original method does accept aMatcher<? super String>
; in this case, changing thestring
method to accept aMatcher<in String>
would also solve this compilation error.The other functions that accept a matcher (
node
andsource
) exhibit the same problem.The text was updated successfully, but these errors were encountered: