Files
kotlin-fork/compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt
T
Evgeny Gerashchenko 897854b3dc KT-6671 Report unused constructor parameters
#KT-6671 fixed
2015-01-27 22:38:27 +03:00

25 lines
860 B
Kotlin

trait In<in T>
trait Out<out T>
trait Inv<T>
fun <T> getT(): T = null!!
class Test<in I, out O, P>(
val type1: <!TYPE_VARIANCE_CONFLICT(I; in; out; I)!>I<!>,
val type2: O,
val type3: P,
val type4: In<I>,
val type5: In<<!TYPE_VARIANCE_CONFLICT(O; out; in; In<O>)!>O<!>>,
var type6: <!TYPE_VARIANCE_CONFLICT(I; in; invariant; I)!>I<!>,
var type7: <!TYPE_VARIANCE_CONFLICT(O; out; invariant; O)!>O<!>,
var type8: P,
var type9: In<<!TYPE_VARIANCE_CONFLICT(I; in; invariant; In<I>)!>I<!>>,
var type0: In<<!TYPE_VARIANCE_CONFLICT(O; out; invariant; In<O>)!>O<!>>,
<!UNUSED_PARAMETER!>type11<!>: I,
<!UNUSED_PARAMETER!>type12<!>: O,
<!UNUSED_PARAMETER!>type13<!>: P,
<!UNUSED_PARAMETER!>type14<!>: In<I>,
<!UNUSED_PARAMETER!>type15<!>: In<O>
)