Files
kotlin-fork/nj2k/testData/newJ2k/annotations/jetbrainsNotNullChainExpr.kt
T
2019-04-03 11:24:19 +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()
}
}