I’m having some trouble with this: ``` inl...
# codereview
j
I’m having some trouble with this:
Copy code
inline infix fun <F : Function0<*>, reified E : Throwable> F.shouldThrow(cb: (E) -> Unit) {}
    infix fun <F : Function0<*>, E : Exception> F.shouldThrow(exn: E) {}

    { someCode() }.shouldThrow { e: RuntimeException -> /* tada */ }
IDEA is reporting:
Copy code
Cannot choose among the following candidates without completing type inference
And lists both of the above methods.