I think this is actually a correction of earlier i...
# compiler
r
I think this is actually a correction of earlier incorrect behavior by the inferencer, due to the presence of a
when
clause in which one of the cases returns
Nothing
. Changing my callee to Kotlin code prompts IJ to produce this inspection warning:
Returning type parameter has been inferred to Nothing implicitly because Nothing is more specific than specified expected type. Please specify type arguments explicitly in accordance with expected type to hide this warning. Nothing can produce an exception at runtime.
This inspection is not triggered when the callee is Java code, but it all makes sense now. I've updated the issue above.