Covered case when variable of our type is multi-declaration entry
This commit is contained in:
+1
-1
@@ -549,7 +549,7 @@ class ExpressionsOfTypeProcessor(
|
||||
*/
|
||||
private fun processSuspiciousDeclaration(declaration: KtDeclaration) {
|
||||
if (declaration is KtDestructuringDeclaration) {
|
||||
//TODO: process entries!
|
||||
declaration.entries.forEach { processSuspiciousDeclaration(it) }
|
||||
}
|
||||
else {
|
||||
if (!isImplicitlyTyped(declaration)) return
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
Checked type of X.f2()
|
||||
Checked type of a1
|
||||
Checked type of a2
|
||||
Checked type of a3
|
||||
Checked type of a4
|
||||
Checked type of b1
|
||||
Checked type of b2
|
||||
Checked type of b3
|
||||
Checked type of b4
|
||||
Checked type of constructor
|
||||
Checked type of fun2
|
||||
Checked type of fun3
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
Checked type of f()
|
||||
Checked type of x
|
||||
Checked type of y
|
||||
Resolved (x, y)
|
||||
Searched references to X
|
||||
Searched references to f() in Kotlin files
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
Checked type of f()
|
||||
Checked type of g()
|
||||
Checked type of x1
|
||||
Checked type of y1
|
||||
Resolved (x1, y1)
|
||||
Searched references to X
|
||||
Searched references to f() in Kotlin files
|
||||
|
||||
@@ -3,6 +3,28 @@ Checked type of g()
|
||||
Checked type of h()
|
||||
Checked type of listOfA()
|
||||
Checked type of listOfA()
|
||||
Checked type of x
|
||||
Checked type of x1
|
||||
Checked type of x1
|
||||
Checked type of x2
|
||||
Checked type of x2
|
||||
Checked type of x3
|
||||
Checked type of x4
|
||||
Checked type of x5
|
||||
Checked type of y
|
||||
Checked type of y1
|
||||
Checked type of y1
|
||||
Checked type of y2
|
||||
Checked type of y2
|
||||
Checked type of y3
|
||||
Checked type of y4
|
||||
Checked type of y5
|
||||
Checked type of z
|
||||
Checked type of z1
|
||||
Checked type of z2
|
||||
Checked type of z3
|
||||
Checked type of z4
|
||||
Checked type of z5
|
||||
Resolved (x, y, z)
|
||||
Resolved (x1, y1)
|
||||
Resolved (x1, y1, z1)
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
Checked type of a
|
||||
Checked type of x
|
||||
Checked type of y
|
||||
Checked type of z
|
||||
Resolved (x, y, z)
|
||||
Searched references to A
|
||||
Searched references to a in Kotlin files
|
||||
|
||||
+10
@@ -1,3 +1,13 @@
|
||||
Checked type of a
|
||||
Checked type of a1
|
||||
Checked type of n
|
||||
Checked type of n1
|
||||
Checked type of x
|
||||
Checked type of x1
|
||||
Checked type of y
|
||||
Checked type of y1
|
||||
Checked type of z
|
||||
Checked type of z1
|
||||
Resolved (a, n)
|
||||
Resolved (a1, n1)
|
||||
Resolved (x, y, z)
|
||||
|
||||
+6
@@ -1,4 +1,10 @@
|
||||
Checked type of f()
|
||||
Checked type of x
|
||||
Checked type of x1
|
||||
Checked type of x2
|
||||
Checked type of y
|
||||
Checked type of y1
|
||||
Checked type of y2
|
||||
Resolved (x, y)
|
||||
Resolved (x1, y1)
|
||||
Resolved (x2, y2)
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
Checked type of parameter a of FOR
|
||||
Checked type of x
|
||||
Checked type of x
|
||||
Checked type of y
|
||||
Checked type of y
|
||||
Checked type of z
|
||||
Resolved (x, y)
|
||||
Resolved (x, y, z)
|
||||
Searched references to A
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
Checked type of list
|
||||
Checked type of x
|
||||
Checked type of x1
|
||||
Checked type of y
|
||||
Checked type of y1
|
||||
Resolved (x, y)
|
||||
Resolved (x1, y1)
|
||||
Searched references to A
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
Checked type of x1
|
||||
Checked type of y1
|
||||
Checked type of y1(a: A)
|
||||
Resolved (x1, y1)
|
||||
Searched references to A
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
Checked type of f()
|
||||
Checked type of g()
|
||||
Checked type of h()
|
||||
Checked type of x
|
||||
Checked type of x1
|
||||
Checked type of x2
|
||||
Checked type of y
|
||||
Checked type of y1
|
||||
Checked type of y2
|
||||
Resolved (x, y)
|
||||
Resolved (x1, y1)
|
||||
Resolved (x2, y2)
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Checked type of x
|
||||
Checked type of x
|
||||
Checked type of x
|
||||
Checked type of y
|
||||
Checked type of y
|
||||
Checked type of y
|
||||
Resolved (x, y)
|
||||
Resolved b1 + b2
|
||||
Searched references to A
|
||||
|
||||
+6
@@ -1,3 +1,9 @@
|
||||
Checked type of a1
|
||||
Checked type of a2
|
||||
Checked type of a2
|
||||
Checked type of n1
|
||||
Checked type of n2
|
||||
Checked type of n2
|
||||
Resolved (a1, n1)
|
||||
Resolved (a2, n2)
|
||||
Resolved (a2, n2)
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
Checked type of a1
|
||||
Checked type of b
|
||||
Checked type of n
|
||||
Checked type of s
|
||||
Resolved (a1, s)
|
||||
Resolved (b, n)
|
||||
Searched references to A
|
||||
|
||||
+4
-1
@@ -6,7 +6,7 @@ class A(val n: Int) {
|
||||
operator fun plus(a: A): A = this + a.n
|
||||
}
|
||||
|
||||
fun test() {
|
||||
fun test(array: Array<A>) {
|
||||
A(0) + A(1) + 2
|
||||
A(0) plus A(1) plus 2
|
||||
A(0).plus(A(1).plus(2))
|
||||
@@ -16,4 +16,7 @@ fun test() {
|
||||
a += A(1)
|
||||
|
||||
+A(0)
|
||||
|
||||
val (a1, a2) = array
|
||||
a1 + 1
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
Checked type of a
|
||||
Checked type of a
|
||||
Checked type of a1
|
||||
Checked type of a1
|
||||
Checked type of a2
|
||||
Checked type of a2
|
||||
Resolved A(0) + A(1)
|
||||
Resolved A(0) + A(1)
|
||||
Resolved A(0) + A(1) + 2
|
||||
@@ -11,6 +15,8 @@ Resolved a += 1
|
||||
Resolved a += 1
|
||||
Resolved a += A(1)
|
||||
Resolved a += A(1)
|
||||
Resolved a1 + 1
|
||||
Resolved a1 + 1
|
||||
Searched references to A
|
||||
Searched references to A
|
||||
Searched references to A.plus(a: A) in Kotlin files
|
||||
@@ -19,8 +25,14 @@ Searched references to A.plus(m: Int) in Kotlin files
|
||||
Searched references to A.plus(m: Int) in Kotlin files
|
||||
Searched references to a in Kotlin files
|
||||
Searched references to a in Kotlin files
|
||||
Searched references to a1 in Kotlin files
|
||||
Searched references to a1 in Kotlin files
|
||||
Searched references to a2 in Kotlin files
|
||||
Searched references to a2 in Kotlin files
|
||||
Searched references to parameter a of A.plus(a: A) in Kotlin files
|
||||
Searched references to parameter a of A.plus(a: A) in Kotlin files
|
||||
Searched references to parameter array of test(array: Array<A>) in Kotlin files
|
||||
Searched references to parameter array of test(array: Array<A>) in Kotlin files
|
||||
Used plain search of A.plus(a: A) in LocalSearchScope:
|
||||
CLASS:A
|
||||
Used plain search of A.plus(m: Int) in LocalSearchScope:
|
||||
|
||||
@@ -2,4 +2,5 @@ Function call 10 A(0) + A(1) + 2
|
||||
Function call 11 A(0) plus A(1) plus 2
|
||||
Function call 12 A(0).plus(A(1).plus(2))
|
||||
Function call 15 a += 1
|
||||
Function call 21 a1 + 1
|
||||
Function call 6 operator fun plus(a: A): A = this + a.n
|
||||
Reference in New Issue
Block a user