343af60cb4
#KT-38597 Fixed
13 lines
480 B
Kotlin
Vendored
13 lines
480 B
Kotlin
Vendored
// "Replace with safe (?.) call" "false"
|
|
// ERROR: Operator call corresponds to a dot-qualified call 'p1.compareTo(p2)' which is not allowed on a nullable receiver 'p1'.
|
|
// ACTION: Add non-null asserted (!!) call
|
|
// ACTION: Flip '>'
|
|
// ACTION: Replace overloaded operator with function call
|
|
// ACTION: Expand boolean expression to 'if else'
|
|
|
|
class SafeType {
|
|
operator fun compareTo(other : SafeType) = 0
|
|
}
|
|
fun safeA(p1: SafeType?, p2: SafeType) {
|
|
val v8 = p1 <caret>> p2
|
|
} |