Files
2024-04-15 11:52:39 +00:00

17 lines
485 B
Kotlin

// "Wrap with '?.let { ... }' call" "false"
// ACTION: Add non-null asserted (b!!) call
// ACTION: Convert to run
// ACTION: Convert to with
// ACTION: Put calls on separate lines
// ACTION: Replace with safe (?.) call
// ACTION: Surround with null check
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type B?
// WITH_STDLIB
class A {
fun foo() {}
}
class B(val a: A)
fun test(b: B?) {
b<caret>.a.foo() // b.a is UNSAFE_CALL
}