Go to (show) implementations: skip light methods that are generated with DELEGATION or DELEGATION_TO_DEFAULT_IMPLS JvmDeclarationOriginKind

Add some unrelated tests for fake overrides
This commit is contained in:
Pavel V. Talanov
2015-12-21 19:37:23 +03:00
parent de6f52030c
commit 99966c17da
15 changed files with 371 additions and 32 deletions
@@ -0,0 +1,26 @@
package testing
interface I {
fun <caret>f() {
}
}
class A : I
class B : I {
override fun f() {
}
}
class C : I
interface II: I
interface III: I {
override fun f() {
}
}
// REF: (in testing.B).f()
// REF: (in testing.III).f()
@@ -0,0 +1,24 @@
package testing
interface I {
val <caret>p: Int
get() = 0
}
class A : I
class B : I {
override val p = 5
}
class C : I
interface II: I
interface III : I {
override val p: Int get() = 1
}
// REF: (in testing.B).p
// REF: (in testing.III).p
@@ -0,0 +1,36 @@
package testing
interface I {
fun <caret>f() {
}
}
class A : I
class B : I {
override fun f() {
}
}
class C : I
interface II: I
interface III: I {
override fun f() {
}
}
class A1(i: I) : I by i
class B1(i: I) : I by i {
override fun f() {
}
}
class C1(i: I) : I by i
// REF: (in testing.B).f()
// REF: (in testing.B1).f()
// REF: (in testing.III).f()
@@ -0,0 +1,19 @@
package testing
interface I {
fun <caret>f() {
}
}
class A(i: I) : I by i
class B(i: I) : I by i {
override fun f() {
}
}
class C(i: I) : I by i
// REF: (in testing.B).f()
@@ -0,0 +1,19 @@
package testing
interface I {
val <caret>p: Int
get() = 0
}
class A(i: I) : I by i
class B(i: I) : I by i {
override val p = 5
}
class C(i: I) : I by i
// REF: (in testing.B).p
@@ -0,0 +1,16 @@
package testing
open class C {
open fun <caret>f() {
}
}
class A : C()
class B : C() {
override fun f() {
}
}
// REF: (in testing.B).f()
@@ -0,0 +1,36 @@
package testing
interface I<T> {
fun <caret>f(): T {
}
}
class A<T> : I<T>
class B<T> : I<T> {
override fun f(): T {
}
}
class C<T> : I<T>
interface II<T>: I<T>
interface III<T>: I<T> {
override fun f(): T {
}
}
class A1<T>(i: I<T>) : I<T> by i
class B1<T>(i: I<T>) : I<T> by i {
override fun f(): T {
}
}
class C1<T>(i: I<T>) : I<T> by i
// REF: (in testing.B).f()
// REF: (in testing.B1).f()
// REF: (in testing.III).f()
@@ -0,0 +1,15 @@
package testing
open class C<T> {
open fun <caret>f(): T {
}
}
class A : C<Int>()
class B : C<String>() {
override fun f() = "A"
}
// REF: (in testing.B).f()