Files
kotlin-fork/idea/testData/intentions/branched/safeAccessToIfThen/assignment3.kt.after
T
Toshiaki Kameyama 5eb69e0ae4 KT-20010 'Replace safe access expression with 'if' expression' IDEA Kotlin plugin intention may failed (#1288)
* 'Replace safe access expression with 'if' expression' IDEA Kotlin plugin intention may failed #KT-20010 Fixed

* #KT-20010 Fixed
2017-09-12 14:54:50 +02:00

10 lines
148 B
Plaintext
Vendored

class Foo {
var bar: Bar? = null
}
class Bar {
var baz = 1
}
fun test(foo: Foo?) {
val bar = foo?.bar
if (bar != null) bar.baz = 2
}