[Analysis API] rework containing declaration provider
now it should work for non-source declarations
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
class A {
|
||||
class B {
|
||||
class C {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface D {
|
||||
inner class E {
|
||||
enum class F {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum class G {
|
||||
H, I
|
||||
}
|
||||
|
||||
|
||||
fun foo() {
|
||||
class D {
|
||||
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
class X {
|
||||
fun foo() {
|
||||
class U {
|
||||
inner class K {
|
||||
inner class D {
|
||||
fun check() {
|
||||
class F {
|
||||
inner class L
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class T
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
enum class A {
|
||||
B, C;
|
||||
fun d(){}
|
||||
val e: Int = 10
|
||||
}
|
||||
|
||||
class X {
|
||||
private Y {
|
||||
enum class U {
|
||||
UB, UC;
|
||||
fun ud(){}
|
||||
val ue: Int = 10
|
||||
}
|
||||
}
|
||||
|
||||
class P {
|
||||
enum class W {
|
||||
WB, WC;
|
||||
fun wd(){}
|
||||
val we: Int = 10
|
||||
}
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
fun a(){}
|
||||
private fun b() {}
|
||||
|
||||
class A {
|
||||
private fun a() {}
|
||||
|
||||
class B {
|
||||
private fun b() {}
|
||||
|
||||
class C {
|
||||
private fun c() {}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface D {
|
||||
private fun d() {}
|
||||
inner class E {
|
||||
private fun e() {}
|
||||
enum class F {
|
||||
private fun f() {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum class G {
|
||||
H, I;
|
||||
|
||||
private fun g() {}
|
||||
}
|
||||
|
||||
|
||||
fun foo() {
|
||||
private fun fooA() {}
|
||||
|
||||
class FooI {
|
||||
private fun m() {}
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
fun x() {
|
||||
val xProperty = 10
|
||||
fun xFunction() = 11
|
||||
typealias xTypealias = 10
|
||||
class XClass<XT> {}
|
||||
enum class XEnum {
|
||||
X_ENUM_ENTRY;
|
||||
|
||||
fun xEnumMember(){}
|
||||
}
|
||||
|
||||
class Y <YT> {
|
||||
val yProperty = 10
|
||||
fun yFunction() = 11
|
||||
typealias yTypealias = 10
|
||||
class YClass<YTT> {}
|
||||
enum class YEnum {
|
||||
Y_ENUM_ENTRY;
|
||||
|
||||
fun yEnumMember(){}
|
||||
|
||||
}
|
||||
init {
|
||||
println("init block in local class")
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
typealias X<XT> = List<X>
|
||||
class A {
|
||||
typealias Y<YS, YV> = Map<YS, YV>
|
||||
|
||||
class B {
|
||||
typealias Q<QS, QV> = MutableMap<QS, QV>
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
typealias L<LS, LV> = Map<LS, LV>
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
interface A {
|
||||
fun <T>foo()
|
||||
}
|
||||
|
||||
interface B {
|
||||
fun <T>foo() {}
|
||||
}
|
||||
|
||||
>class Y<caret> : A, B
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fun <T> foo() fromClass Y
|
||||
T from /Y.foo
|
||||
|
||||
fun equals(other: Any?): Boolean fromClass kotlin/Any
|
||||
|
||||
fun hashCode(): Int fromClass kotlin/Any
|
||||
|
||||
fun toString(): String fromClass kotlin/Any
|
||||
|
||||
constructor() fromClass Y
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
abstract class X<T> {
|
||||
fun <S> foo1(t: T): T = t
|
||||
fun <Q> foo2(t: T) {}
|
||||
fun <U> foo3() {}
|
||||
}
|
||||
|
||||
class Y<caret> : X<Int> {}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
fun <S> foo1(t: Int): Int fromClass Y
|
||||
S from /Y.foo1
|
||||
|
||||
fun <Q> foo2(t: Int) fromClass Y
|
||||
Q from /Y.foo2
|
||||
|
||||
fun <U> foo3() fromClass X
|
||||
U from /X.foo3
|
||||
|
||||
fun equals(other: Any?): Boolean fromClass kotlin/Any
|
||||
|
||||
fun hashCode(): Int fromClass kotlin/Any
|
||||
|
||||
fun toString(): String fromClass kotlin/Any
|
||||
|
||||
constructor() fromClass Y
|
||||
Reference in New Issue
Block a user