[FIR-IDE] Hack for checking single candidate resolver in tests

This commit is contained in:
Pavel Kirpichenkov
2020-08-19 13:18:53 +03:00
parent 2c816d8911
commit ec072798b1
10 changed files with 191 additions and 4 deletions
@@ -0,0 +1,20 @@
class A
open class B
class C : B()
interface D
fun <T> T.ext1() where T : B {}
fun B.ext2() {}
fun A.ext3() {}
fun <T> T.ext4() where T : B, T : D {}
fun usage() {
val c = C()
c.ext<caret>
}
// EXIST: ext1
// EXIST: ext2
// ABSENT: ext3
// ABSENT: ext4
@@ -0,0 +1,11 @@
fun <T : Int> T.ext1() {}
fun <T : String> T.ext2() {}
fun test() {
with(42) {
ext<caret>
}
}
// EXIST: ext1
// ABSENT: ext2
@@ -0,0 +1,24 @@
class A<T1, T2> {
fun foo1() {}
class B<T3, T4> {
fun foo2() {}
fun foo3() {
foo<caret>
}
}
class C
companion object {
fun <T7, T8> B<T7, T8>.foo4() {}
fun C.foo5() {}
}
}
// ABSENT: foo1
// EXIST: foo2
// EXIST: foo3
// EXIST: foo4
// ABSENT: foo5