Files
kotlin/compiler/testData/codegen/notNullAssertions/noAssertionForNullableCaptured.kt
Denis Zharkov 58caff3411 Minor. Add tests checking not-null assertions
More precisely these tests check cases when expected type
was somehow obtained from captured type (in member scope with projections)
2015-12-28 07:44:56 +03:00

8 lines
129 B
Kotlin
Vendored

class A<T> {
fun add(element: T) {}
}
public fun <R> foo(x: MutableCollection<in R>, block: () -> R) {
x.add(block())
}