Files
kotlin-fork/compiler/visualizer/testData/uncommonCases/testFiles/variance.kt
T
Ivan Cilcic aebe8c36f5 Add test methods and data for uncommon cases
Uncommon means mostly that aren't present in raw fir builder data
2019-08-30 11:50:31 +03:00

16 lines
284 B
Kotlin
Vendored

interface Source<out T> {
fun nextT(): T
}
fun demo(strs: Source<String>) {
val objects: Source<Any> = strs
}
interface Comparable<in T> {
operator fun compareTo(other: T): Int
}
fun demo(x: Comparable<Number>) {
x.compareTo(1.0)
val y: Comparable<Double> = x
}