Wrap with let: apply to unsafe qualified expression

#KT-18125 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-07-08 09:50:03 +09:00
committed by Vladimir Dolzhenko
parent 18fbf5729d
commit 6db0785615
7 changed files with 83 additions and 12 deletions
@@ -0,0 +1,12 @@
// "Wrap with '?.let { ... }' call" "false"
// ACTION: Add 's =' to argument
// ACTION: Add non-null asserted (!!) call
// ACTION: Replace with safe (?.) call
// ACTION: Surround with null check
// DISABLE-ERRORS
// WITH_RUNTIME
fun foo(s: String?) {}
fun bar(s: String?) {
foo(s<caret>.substring(1))
}