Files
kotlin-fork/j2k/testData/fileOrElement/annotations/jetbrainsNotNullChainExpr.kt
T
2019-09-24 16:22:24 +03:00

21 lines
463 B
Kotlin
Vendored

// !forceNotNullTypes: false
// !specifyLocalVariableTypeByDefault: true
package test
internal class Foo {
fun execute() {}
}
internal class Bar {
var fooNotNull = Foo()
var fooNullable: Foo? = null
}
internal class Test {
fun test(barNotNull: Bar, barNullable: Bar) {
barNotNull.fooNotNull.execute()
barNotNull.fooNullable!!.execute()
barNullable.fooNotNull.execute()
barNullable.fooNullable!!.execute()
}
}