[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
@@ -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