robfletcher
12/10/2017, 7:29 PMfun <ACTUAL> expect(
actual: ACTUAL,
block: ObjectAssert<ACTUAL>.(ACTUAL) -> Unit
): ObjectAssert<ACTUAL>
and fun <ELEMENT> expect(
actual: List<ELEMENT>,
block: SoftAssertionListAssert<ELEMENT>.(List<ELEMENT>) -> Unit
): SoftAssertionListAssert<ELEMENT>
that the compiler is unable to distinguish between at the call site. I get why that’s an issue but confusingly I have overloads of both that only accept the first parameter: fun <ACTUAL> expect(actual: ACTUAL): AbstractObjectAssert<*, ACTUAL>
and fun <ELEMENT> expect(actual: List<ELEMENT>): ListAssert<ELEMENT>
that the compiler can distinguish. Can anyone enlighten me as to why one is a problem and no the other? Is there any way I can disambiguate the 2 param form?karelpeeters
12/10/2017, 7:58 PMSoftAssertionListAssert
and ObjectAssert
?Andreas Sinz
12/10/2017, 10:51 PMexpect
?robfletcher
12/11/2017, 1:21 AMAndreas Sinz
12/11/2017, 9:57 AMrobfletcher
12/11/2017, 6:38 PMAndreas Sinz
12/11/2017, 8:55 PMrobfletcher
12/11/2017, 8:56 PM