rocketraman
04/17/2020, 2:32 PMwhen
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.