[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
|
||||
interface TypeBounds1<in I, out O, P, X : I>
|
||||
interface TypeBounds2<in I, out O, P, X : O>
|
||||
interface TypeBounds3<in I, out O, P, X : P>
|
||||
interface TypeBounds4<in I, out O, P, X : In<I>>
|
||||
interface TypeBounds5<in I, out O, P, X : In<O>>
|
||||
|
||||
interface WhereTypeBounds1<in I, out O, P, X> where X : I
|
||||
interface WhereTypeBounds2<in I, out O, P, X> where X : O
|
||||
interface WhereTypeBounds3<in I, out O, P, X> where X : P
|
||||
interface WhereTypeBounds4<in I, out O, P, X> where X : In<I>
|
||||
interface WhereTypeBounds5<in I, out O, P, X> where X : In<O>
|
||||
|
||||
class SubClass1<in I, out O, P> : Out<I>
|
||||
class SubClass2<in I, out O, P> : Out<O>
|
||||
class SubClass3<in I, out O, P> : Out<P>
|
||||
class SubClass4<in I, out O, P> : In<I>
|
||||
class SubClass5<in I, out O, P> : In<O>
|
||||
class SubClass6<in I, out O, P> : Inv<O>
|
||||
class SubClass7<in I, out O, P> : Inv<I>
|
||||
@@ -0,0 +1,34 @@
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
interface Test<in I, out O, P> {
|
||||
fun parameters1(i: I, o: O, p: P)
|
||||
fun parameters2(i: In<I>)
|
||||
fun parameters3(i: In<O>)
|
||||
|
||||
fun explicitReturnType1() : I
|
||||
fun explicitReturnType2() : O
|
||||
fun explicitReturnType3() : P
|
||||
fun explicitReturnType4() : In<I>
|
||||
fun explicitReturnType5() : In<O>
|
||||
|
||||
fun imlicitReturnType1() = getT<I>()
|
||||
fun imlicitReturnType2() = getT<O>()
|
||||
fun imlicitReturnType3() = getT<P>()
|
||||
fun imlicitReturnType4() = getT<In<I>>()
|
||||
fun imlicitReturnType5() = getT<In<O>>()
|
||||
|
||||
fun I.receiver1()
|
||||
fun O.receiver2()
|
||||
fun P.receiver3()
|
||||
fun In<I>.receiver4()
|
||||
fun In<O>.receiver5()
|
||||
|
||||
fun <X : I> typeParameter1()
|
||||
fun <X : O> typeParameter2()
|
||||
fun <X : P> typeParameter3()
|
||||
fun <X : In<I>> typeParameter4()
|
||||
fun <X : In<O>> typeParameter5()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
interface In<in T>
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
interface Test<in I, out O, P> {
|
||||
fun ok1(i: (O) -> I) : (I) -> O
|
||||
fun ok2(i: (P) -> P) : (P) -> P
|
||||
fun ok3(i: (In<I>) -> In<O>) = getT<(In<O>) -> In<I>>()
|
||||
|
||||
fun neOk1(i: (I) -> O): (O) -> I
|
||||
fun neOk2(i: (In<O>) -> In<I>)
|
||||
fun neOk3() = getT<(In<I>) -> In<O>>()
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
interface Pair<out X, out Y>
|
||||
|
||||
interface Test<in I, out O, P> {
|
||||
fun ok1(i: I)
|
||||
fun ok2(i: In<O>)
|
||||
fun ok3(i: In<In<I>>)
|
||||
fun ok4(i: Inv<P>)
|
||||
fun ok5(i: P)
|
||||
fun ok6(i: Out<I>)
|
||||
fun ok7(i: Out<Out<I>>)
|
||||
fun ok8(i: Out<In<O>>)
|
||||
fun ok9(i: Out<In<P>>)
|
||||
fun Ok10(i: I)
|
||||
fun Ok11(i: In<O>)
|
||||
fun Ok12(i: In<In<I>>)
|
||||
fun Ok13(i: Out<I>)
|
||||
fun Ok14(i: Pair<In<O>, I>)
|
||||
fun Ok15(i: Inv<out I>)
|
||||
|
||||
fun Ok20(i: Inv<in O>)
|
||||
fun Ok21(i: Inv<in P>)
|
||||
fun Ok22(i: Inv<out I>)
|
||||
fun Ok23(i: Inv<out P>)
|
||||
|
||||
fun neOk1(i: O)
|
||||
fun neOk2(i: In<I>)
|
||||
fun neOk3(i: In<In<O>>)
|
||||
fun neOk4(i: Inv<I>)
|
||||
fun neOk5(i: Inv<O>)
|
||||
fun neOk6(i: In<In<O>>)
|
||||
fun neOk7(i: Pair<In<I>, O>)
|
||||
fun neOk8(i: Inv<out O>)
|
||||
fun neOk9(i: In<out P>)
|
||||
fun neOk10(i: Out<O>)
|
||||
|
||||
fun neOk11(i: Inv<in I>)
|
||||
fun neOk12(i: Inv<out O>)
|
||||
|
||||
fun neOk30(i: Pair<O, >)
|
||||
fun neOk31(i: Pair<O, Inv>)
|
||||
fun neOk32(i: Inv)
|
||||
fun neOk33(i: Inv<<!SYNTAX!><!>>)
|
||||
fun neOk34(i: Inv<C>)
|
||||
fun neOk35(i: Inv<P, P>)
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
interface Pair<out X, out Y>
|
||||
|
||||
interface Test<in I, out O, P> {
|
||||
var ok1: Inv<P>
|
||||
var ok2: P
|
||||
var ok3: Out<In<P>>
|
||||
var ok4: Pair<In<P>, Out<P>>
|
||||
var ok5: Inv<out P>
|
||||
var ok6: Inv<in P>
|
||||
var ok7: Inv<out P>
|
||||
|
||||
var neOk1: O
|
||||
var neOk2: In<I>
|
||||
var neOk3: In<In<O>>
|
||||
var neOk4: Inv<I>
|
||||
var neOk5: Inv<O>
|
||||
var neOk6: In<In<O>>
|
||||
var neOk7: Pair<In<I>, O>
|
||||
var neOk8: Inv<in O>
|
||||
var neOk9: Inv<in I>
|
||||
var neOk10: In<out I>
|
||||
|
||||
var neOk11: I
|
||||
var neOk12: In<O>
|
||||
var neOk13: In<In<I>>
|
||||
var neOk14: Out<I>
|
||||
var neOk15: Out<Out<I>>
|
||||
var neOk16: Out<In<O>>
|
||||
var neOk17: Pair<In<O>, I>
|
||||
|
||||
var neOk20: Inv<in O>
|
||||
var neOk21: Inv<in I>
|
||||
var neOk22: Inv<out O>
|
||||
var neOk23: Inv<out I>
|
||||
|
||||
var neOk30: Pair<I, >
|
||||
var neOk31: Pair<I, Inv>
|
||||
var neOk32: Inv
|
||||
var neOk33: Inv<<!SYNTAX!><!>>
|
||||
var neOk34: Inv<C>
|
||||
var neOk35: Inv<P, P>
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
interface In<in I>
|
||||
interface Out<out O>
|
||||
interface Inv<P>
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
|
||||
interface Test<in I : Any, out O : Any, P : Any> {
|
||||
fun ok1(i: I?) : O?
|
||||
fun ok2(i: In<O?>?) : Out<O?>?
|
||||
fun ok3(i: Inv<in O?>) = getT<Inv<in I?>>()
|
||||
|
||||
fun neOk1(i: O?) : I?
|
||||
fun neOk(i: Out<O?>?) : In<O?>?
|
||||
fun neOk3(i: Inv<in I?>)
|
||||
fun neOk4() = getT<Inv<in O?>?>()
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
interface Pair<out X, out Y>
|
||||
|
||||
interface Test<in I, out O, P> {
|
||||
fun ok1(): O
|
||||
fun ok2(): In<I>
|
||||
fun ok3(): In<In<O>>
|
||||
fun ok4(): Inv<P>
|
||||
fun ok5(): P
|
||||
fun ok6(): Out<O>
|
||||
fun ok7(): Out<P>
|
||||
fun ok8(): Out<In<P>>
|
||||
fun ok9(): Pair<In<I>, O>
|
||||
|
||||
fun ok10(): Inv<in I>
|
||||
fun ok11(): Inv<out O>
|
||||
fun ok12(): Inv<in P>
|
||||
fun ok13(): Inv<out P>
|
||||
|
||||
fun neOk1(): I
|
||||
fun neOk2(): In<O>
|
||||
fun neOk3(): In<In<I>>
|
||||
fun neOk4(): Inv<I>
|
||||
fun neOk5(): Inv<O>
|
||||
fun neOk6(): Pair<In<O>, I>
|
||||
fun neOk7(): Inv<in O>
|
||||
fun neOk8(): Out<in I>
|
||||
|
||||
fun neOk10(): Inv<in O>
|
||||
fun neOk11(): Inv<out I>
|
||||
|
||||
fun neOk30(): Pair<I, >
|
||||
fun neOk31(): Pair<I, Inv>
|
||||
fun neOk32(): Inv
|
||||
fun neOk33(): Inv<<!SYNTAX!><!>>
|
||||
fun neOk34(): Inv<C>
|
||||
fun neOk35(): Inv<P, P>
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
class Test<in I, out O, P>(
|
||||
val type1: I,
|
||||
val type2: O,
|
||||
val type3: P,
|
||||
val type4: In<I>,
|
||||
val type5: In<O>,
|
||||
|
||||
var type6: I,
|
||||
var type7: O,
|
||||
var type8: P,
|
||||
var type9: In<I>,
|
||||
var type0: In<O>,
|
||||
|
||||
type11: I,
|
||||
type12: O,
|
||||
type13: P,
|
||||
type14: In<I>,
|
||||
type15: In<O>
|
||||
)
|
||||
@@ -0,0 +1,50 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
|
||||
class Delegate<T> {
|
||||
operator fun getValue(t: Any, p: KProperty<*>): T = null!!
|
||||
operator fun setValue(t: Any, p: KProperty<*>, value: T) {}
|
||||
}
|
||||
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
abstract class Test<in I, out O, P> {
|
||||
abstract val type1: I
|
||||
abstract val type2: O
|
||||
abstract val type3: P
|
||||
abstract val type4: In<I>
|
||||
abstract val type5: In<O>
|
||||
|
||||
val implicitType1 = getT<I>()
|
||||
val implicitType2 = getT<O>()
|
||||
val implicitType3 = getT<P>()
|
||||
val implicitType4 = getT<In<I>>()
|
||||
val implicitType5 = getT<In<O>>()
|
||||
|
||||
val delegateType1 by Delegate<I>()
|
||||
val delegateType2 by Delegate<O>()
|
||||
val delegateType3 by Delegate<P>()
|
||||
val delegateType4 by Delegate<In<I>>()
|
||||
val delegateType5 by Delegate<In<O>>()
|
||||
|
||||
abstract val I.receiver1: Int
|
||||
abstract val O.receiver2: Int
|
||||
abstract val P.receiver3: Int
|
||||
abstract val In<I>.receiver4: Int
|
||||
abstract val In<O>.receiver5: Int
|
||||
|
||||
val <X : I> X.typeParameter1: Int get() = 0
|
||||
val <X : O> X.typeParameter2: Int get() = 0
|
||||
val <X : P> X.typeParameter3: Int get() = 0
|
||||
val <X : In<I>> X.typeParameter4: Int get() = 0
|
||||
val <X : In<O>> X.typeParameter5: Int get() = 0
|
||||
|
||||
val <X> X.typeParameter6: Int where X : I get() = 0
|
||||
val <X> X.typeParameter7: Int where X : O get() = 0
|
||||
val <X> X.typeParameter8: Int where X : P get() = 0
|
||||
val <X> X.typeParameter9: Int where X : In<I> get() = 0
|
||||
val <X> X.typeParameter0: Int where X : In<O> get() = 0
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
interface In<in T>
|
||||
interface Out<out T>
|
||||
interface Inv<T>
|
||||
|
||||
class Delegate<T> {
|
||||
operator fun getValue(t: Any, p: KProperty<*>): T = null!!
|
||||
operator fun setValue(t: Any, p: KProperty<*>, varue: T) {}
|
||||
}
|
||||
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
abstract class Test<in I, out O, P> {
|
||||
abstract var type1: I
|
||||
abstract var type2: O
|
||||
abstract var type3: P
|
||||
abstract var type4: In<I>
|
||||
abstract var type5: In<O>
|
||||
|
||||
var implicitType1 = getT<I>()
|
||||
var implicitType2 = getT<O>()
|
||||
var implicitType3 = getT<P>()
|
||||
var implicitType4 = getT<In<I>>()
|
||||
var implicitType5 = getT<In<O>>()
|
||||
|
||||
var delegateType1 by Delegate<I>()
|
||||
var delegateType2 by Delegate<O>()
|
||||
var delegateType3 by Delegate<P>()
|
||||
var delegateType4 by Delegate<In<I>>()
|
||||
var delegateType5 by Delegate<In<O>>()
|
||||
|
||||
abstract var I.receiver1: Int
|
||||
abstract var O.receiver2: Int
|
||||
abstract var P.receiver3: Int
|
||||
abstract var In<I>.receiver4: Int
|
||||
abstract var In<O>.receiver5: Int
|
||||
|
||||
var <X : I> X.typeParameter1: Int get() = 0; set(i) {}
|
||||
var <X : O> X.typeParameter2: Int get() = 0; set(i) {}
|
||||
var <X : P> X.typeParameter3: Int get() = 0; set(i) {}
|
||||
var <X : In<I>> X.typeParameter4: Int get() = 0; set(i) {}
|
||||
var <X : In<O>> X.typeParameter5: Int get() = 0; set(i) {}
|
||||
|
||||
var <X> X.typeParameter6: Int where X : I get() = 0; set(i) {}
|
||||
var <X> X.typeParameter7: Int where X : O get() = 0; set(i) {}
|
||||
var <X> X.typeParameter8: Int where X : P get() = 0; set(i) {}
|
||||
var <X> X.typeParameter9: Int where X : In<I> get() = 0; set(i) {}
|
||||
var <X> X.typeParameter0: Int where X : In<O> get() = 0; set(i) {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
interface Test<in I, out O> {
|
||||
val internal_val: I
|
||||
public val public_val: I
|
||||
protected val protected_val: I
|
||||
private val private_val: I
|
||||
|
||||
var interlan_private_set: O
|
||||
private set
|
||||
public var public_private_set: O
|
||||
private set
|
||||
protected var protected_private_set: O
|
||||
private set
|
||||
private var private_private_set: O
|
||||
private set
|
||||
|
||||
fun internal_fun(i: O) : I
|
||||
public fun public_fun(i: O) : I
|
||||
protected fun protected_fun(i: O) : I
|
||||
private fun private_fun(i: O) : I
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// https://ea.jetbrains.com/browser/ea_reports/1337846
|
||||
|
||||
//interface ComputablePoint<NumberType : Number>
|
||||
//
|
||||
//interface ComputableSegment<NumberType: Number, PointType>
|
||||
//
|
||||
//interface ComputableLineSegment<NumberType: Number, PointType> : ComputableSegment<NumberType, PointType>
|
||||
|
||||
//interface Path<NumberType, PointType, SegmentType>
|
||||
|
||||
typealias EachSegmentComparator<SegmentType> = (currentSegment: SegmentType, otherSegment: SegmentType, relationship: Int) -> Boolean
|
||||
|
||||
interface ComputablePath<NumberType, PointType, out SegmentType>
|
||||
: Path<NumberType, PointType, SegmentType>
|
||||
where
|
||||
NumberType: Number,
|
||||
PointType: ComputablePoint<NumberType>,
|
||||
SegmentType: ComputableLineSegment<NumberType, PointType>
|
||||
{
|
||||
fun anyTwoSegments(comparator: EachSegmentComparator<ComputableSegment<NumberType, PointType>>): Boolean
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
internal abstract class Test</*0*/ in I> {
|
||||
private/*private to this*/ final fun foo(): I {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
private/*private to this*/ final val i: I get() = foo()
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
class Test<in I> {
|
||||
private fun foo() : I = getT()
|
||||
|
||||
fun apply(i: I) {}
|
||||
|
||||
init {
|
||||
foo()
|
||||
this.foo()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
apply(foo())
|
||||
apply(this.foo())
|
||||
with(Test<I>()) {
|
||||
apply(foo()) // resolved to this@Test.foo
|
||||
apply(this.foo())
|
||||
apply(this@with.foo())
|
||||
apply(this@Test.foo())
|
||||
}
|
||||
}
|
||||
|
||||
fun <I> test(t: Test<I>) {
|
||||
t.apply(t.foo())
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun <I> test(t: Test<I>) {
|
||||
t.apply(t.foo())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <I> test(t: Test<I>) {
|
||||
t.apply(t.<!INAPPLICABLE_CANDIDATE!>foo<!>())
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
class Test<in I, out O> {
|
||||
private val i: I = getT()
|
||||
|
||||
init {
|
||||
apply(i)
|
||||
apply(this.i)
|
||||
}
|
||||
|
||||
fun apply(i: I) {}
|
||||
|
||||
fun test() {
|
||||
apply(i)
|
||||
apply(this.i)
|
||||
with(Test<I, O>()) {
|
||||
apply(i) // resolved to this@Test.i
|
||||
apply(this.i)
|
||||
apply(this@with.i)
|
||||
apply(this@Test.i)
|
||||
}
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.apply(t.i)
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.apply(t.i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.apply(t.<!INAPPLICABLE_CANDIDATE!>i<!>)
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
class Test<in I, out O> {
|
||||
private var i: I = getT()
|
||||
private val j: I
|
||||
|
||||
init {
|
||||
j = getT()
|
||||
i = getT()
|
||||
this.i = getT()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
i = getT()
|
||||
this.i = getT()
|
||||
with(Test<I, O>()) {
|
||||
i = getT() // resolved to this@Test.i
|
||||
this.i = getT()
|
||||
this@with.i = getT()
|
||||
this@Test.i = getT()
|
||||
}
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.i = getT()
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.i = getT()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.<!INAPPLICABLE_CANDIDATE!>i<!> = getT()
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
fun <T> getT(): T = null!!
|
||||
|
||||
class A<in I>(init: I) {
|
||||
private val i: I
|
||||
|
||||
init {
|
||||
i = getT()
|
||||
}
|
||||
|
||||
private var i2 = i
|
||||
private val i3: I
|
||||
|
||||
private var i4 = getT<I>()
|
||||
|
||||
init {
|
||||
i2 = getT()
|
||||
i3 = init
|
||||
i4 = i3
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user