Files
kotlin-fork/idea/testData/quickfix/surroundWithNullCheck/unstableValue.kt
T
2016-06-13 15:33:36 +03:00

12 lines
339 B
Kotlin
Vendored

// "Surround with null check" "false"
// ACTION: Introduce local variable
// ACTION: Add non-null asserted (!!) call
// ACTION: Replace with safe (?.) call
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
class My(var x: Int?) {
fun foo() {
x<caret>.hashCode()
}
}