This inspection reports not-null assertion (
!!
) calls that can be replaced with elvis and return (
?: return
). For example:
val number: Int? = 42 fun foo() { val a = number!! // Replace '!!' with '?: return' println(1 + a) }