Quick-fix "wrap with safe let call" introduced #KT-11104 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-06-06 15:53:07 +03:00
committed by Mikhail Glukhikh
parent f8b6ed226a
commit 47c1106d5d
10 changed files with 157 additions and 0 deletions
@@ -0,0 +1,13 @@
// "Wrap with '?.let { ... }' call" "false"
// WITH_RUNTIME
// ACTION: Add non-null asserted (!!) call
// ACTION: Introduce local variable
// 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()
}
}