Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/projectionsScope/lambdaArgument.kt
T
2020-09-14 17:56:39 +03:00

18 lines
272 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
class A<T> {
fun foo(f: (T) -> Unit) {}
}
fun test(a: A<out Number>, b: A<in Number>) {
a.foo {
it checkType { _<Number>() }
}
b.foo {
it checkType { _<Any?>() }
}
}