package a interface A fun id(t: T): T = t fun doList(l: List) = l fun doInt(i: Int) = i fun strangeNullableList(f: (T) -> Unit): List? = throw Exception() fun emptyNullableListOfA(): List? = null //------------------------------- fun testExclExcl() { doList(emptyNullableListOfA()!!) //should be an error here val l: List = id(emptyNullableListOfA()!!) doList(strangeNullableList { doInt(it) }!!) //lambda should be analyzed (at completion phase) } fun testDataFlowInfoAfterExclExcl(a: Int?) { doInt(a!!) a + 1 } fun testUnnecessaryExclExcl(a: Int) { doInt(a!!) //should be warning }