Summary
When trying to use .extracting() with lambdas in kotlin, the call is ambigous and will not compile out-of-the-box. I think this is due to
extracting(ThrowingExtractor<? super ELEMENT, V, EXCEPTION> extractor)
and
extracting(Function<? super ELEMENT, V> extractor)
have the same effective signature because in kotlin, there are no checked exceptions (thank god).
Example
assertThat(highlights).hasSize(6).extracting(HighlightInfo::getText).doesNotContain("assertThat")
// nor does this work
assertThat(highlights).hasSize(6).extracting { it.text }.doesNotContain("assertThat")
I've got no idea on how to fix that in a backwards compatible manner other than to have a different method name for kotlin that won't clash or trying to add an extension that will cope with it.
Summary
When trying to use .extracting() with lambdas in kotlin, the call is ambigous and will not compile out-of-the-box. I think this is due to
extracting(ThrowingExtractor<? super ELEMENT, V, EXCEPTION> extractor)and
extracting(Function<? super ELEMENT, V> extractor)have the same effective signature because in kotlin, there are no checked exceptions (thank god).
Example
I've got no idea on how to fix that in a backwards compatible manner other than to have a different method name for kotlin that won't clash or trying to add an extension that will cope with it.