Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt
T
Stanislav Erokhin 298a075381 Minor. removed functions which declared in Standard.kt from diagnostic testdata.
Removed declaration for functions: TODO, run, with, apply, let.
2016-01-25 19:13:31 +03:00

11 lines
271 B
Kotlin
Vendored

class Foo(val bar: String?)
fun test(foo: Foo?) {
foo!!.bar.let {
// Correct
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length
// Unnecessary
foo<!UNNECESSARY_SAFE_CALL!>?.<!>bar?.length
}
<!DEBUG_INFO_SMARTCAST!>foo<!>.bar?.length
}