Files
kotlin-fork/idea/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt
T
Ilya Kirillov bd38363077 FIR IDE: use IGNORE_FIR instead of FIR_COMPARISON in hl quick fix tests
To explicitly specify which test are failing
2021-04-01 18:24:17 +02:00

14 lines
301 B
Kotlin
Vendored

// "Replace with safe (?.) call" "false"
// ACTION: Add non-null asserted (!!) call
// ACTION: Replace with safe (this?.) call
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type A?
class A {
fun foo() {
}
}
fun A?.bar() {
<caret>foo()
}