blob: 0c91e568c8f05f9f276369055ef416c1afa46790 [file] [log] [blame]
interface TypeParameter
interface A<OptionalTypeParameter : TypeParameter?> {
fun whatever(params: OptionalTypeParameter)
}
class B : A<Nothing?> {
override fun whatever(params: Nothing?) {
// We know this class doesn't use the type parameter, the value is just 'null'
}
}
inline fun <reified T : TypeParameter?> foo(it: A<T>) = Unit
fun main() {
val b = B()
foo(b)
}