[FIR IDE] Add Fir lightclasses tests and fix FindUsages tests
This commit is contained in:
committed by
Ilya Kirillov
parent
3cefef03ff
commit
dbb54c87bc
@@ -1,6 +1,7 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiField
|
||||
// OPTIONS: skipWrite
|
||||
// FIR_COMPARISON
|
||||
public class A {
|
||||
public String <caret>foo = "foo";
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiMethod
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
class A {
|
||||
public void <caret>foo() {
|
||||
|
||||
@@ -12,4 +11,6 @@ class B extends A {
|
||||
public void foo() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+3
-2
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiMethod
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
public class Bar {
|
||||
public String getValue() {
|
||||
return "value";
|
||||
@@ -9,4 +8,6 @@ public class Bar {
|
||||
public String <caret>getValue(String param) {
|
||||
return "value " + param;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+3
-1
@@ -26,4 +26,6 @@ class Test {
|
||||
new B().getP();
|
||||
new B().setP(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+3
-1
@@ -26,4 +26,6 @@ class Test {
|
||||
new B().getP();
|
||||
new B().setP(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
@@ -1,7 +1,8 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package pack
|
||||
|
||||
data class A(val <caret>a: Int, val b: String)
|
||||
data class A(val <caret>a: Int, val b: String)
|
||||
|
||||
// FIR_IGNORE
|
||||
+3
-2
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>a: Int, val b: Int) {
|
||||
fun f() {}
|
||||
@@ -24,4 +23,6 @@ fun foo(x: X) {
|
||||
val (a3, b3) = constructor(1, 2)
|
||||
|
||||
val (a4, b4) = A::class.java.newInstance()
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
Value read 20 val (a1, b1) = fun2()
|
||||
Value read 21 val (a2, b2) = fun3()
|
||||
Value read 24 val (a3, b3) = constructor(1, 2)
|
||||
Value read 26 val (a4, b4) = A::class.java.newInstance()
|
||||
Value read 19 val (a1, b1) = fun2()
|
||||
Value read 20 val (a2, b2) = fun3()
|
||||
Value read 23 val (a3, b3) = constructor(1, 2)
|
||||
Value read 25 val (a4, b4) = A::class.java.newInstance()
|
||||
+2
-2
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int) {
|
||||
companion object {
|
||||
@@ -14,4 +13,5 @@ fun foo() {
|
||||
val (x, y) = A.b()
|
||||
}
|
||||
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_COMPARISON
|
||||
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package pack
|
||||
|
||||
@@ -27,3 +26,5 @@ fun List<A>.ext1() {
|
||||
}
|
||||
|
||||
fun <T> T.getThis(): T = this
|
||||
|
||||
// FIR_IGNORE
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
[dataClass.0.kt] Value read 18 val (x, y) = getThis()
|
||||
[dataClass.0.kt] Value read 26 val (x, y) = get(0)
|
||||
[dataClass.0.kt] Value read 17 val (x, y) = getThis()
|
||||
[dataClass.0.kt] Value read 25 val (x, y) = get(0)
|
||||
[dataClass.1.kt] Function call 6 a.component1()
|
||||
[dataClass.1.kt] Value read 10 val (x2, y2, z2) = g()
|
||||
[dataClass.1.kt] Value read 11 val (x3, y3, z3) = h()
|
||||
|
||||
+2
-1
@@ -1,7 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIND_BY_REF
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val n: Int, val s: String, val o: Any)
|
||||
|
||||
@@ -11,3 +10,5 @@ fun test() {
|
||||
a.<caret>component1()
|
||||
val (x, y, z) = a
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 10 a.n
|
||||
Value read 9 a.n
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Function call 11 a.component1()
|
||||
Value read 10 a.n
|
||||
Value read 12 val (x, y, z) = a
|
||||
Function call 10 a.component1()
|
||||
Value read 11 val (x, y, z) = a
|
||||
Value read 9 a.n
|
||||
+3
-2
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int, val z: String)
|
||||
data class B(val a: A, val n: Int)
|
||||
@@ -16,4 +15,6 @@ fun f(b: B, c: C) {
|
||||
|
||||
val (a1, n1) = c
|
||||
val (x1, y1, z1) = a1
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 15 val (x, y, z) = a
|
||||
Value read 14 val (x, y, z) = a
|
||||
Vendored
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 15 val (x, y, z) = a
|
||||
Value read 18 val (x1, y1, z1) = a1
|
||||
Value read 14 val (x, y, z) = a
|
||||
Value read 17 val (x1, y1, z1) = a1
|
||||
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>n: Int, val s: String, val o: Any) {
|
||||
|
||||
@@ -12,3 +11,5 @@ fun test() {
|
||||
val (x, y) = a
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
@@ -1,2 +1,2 @@
|
||||
Value read 12 val (x, y) = a
|
||||
Value read 8 for ((x, y, z) in arrayOf<A>()) {
|
||||
Value read 11 val (x, y) = a
|
||||
Value read 7 for ((x, y, z) in arrayOf<A>()) {
|
||||
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int)
|
||||
|
||||
@@ -15,4 +14,5 @@ fun y(o: Any) {
|
||||
val list = o as List<A>
|
||||
val (x, y) = list[0]
|
||||
}
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_IGNORE
|
||||
Vendored
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 16 val (x, y) = list[0]
|
||||
Value read 9 val (x, y) = o
|
||||
Value read 15 val (x, y) = list[0]
|
||||
Value read 8 val (x, y) = o
|
||||
@@ -1,3 +1,3 @@
|
||||
Value read 10 val (x1, y1) = A(1, "", "")
|
||||
Value read 16 val (x, y) = list[0]
|
||||
Value read 9 val (x, y) = o
|
||||
Value read 15 val (x, y) = list[0]
|
||||
Value read 8 val (x, y) = o
|
||||
Value read 9 val (x1, y1) = A(1, "", "")
|
||||
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>a: Int, val b: Int)
|
||||
|
||||
@@ -39,4 +38,6 @@ var Any.v: (A) -> Unit
|
||||
|
||||
fun f() {
|
||||
"".v = { val (x, y ) = it }
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Value read 29 takeFun2 { a, n -> val (x, y) = a!! }
|
||||
Value read 28 takeFun2 { a, n -> val (x, y) = a!! }
|
||||
@@ -1,8 +1,8 @@
|
||||
Value read 20 p[0] = { val (x, y) = it }
|
||||
Value read 26 takeExtFun { val (x, y) = this }
|
||||
Value read 28 takeFun1 { val (x, y) = it }
|
||||
Value read 29 takeFun2 { a, n -> val (x, y) = a!! }
|
||||
Value read 30 takeFun3 { val (x, y) = it[0] }
|
||||
Value read 32 x(p) { val (x, y) = it }
|
||||
Value read 33 x(p, fun (p) { val (x, y) = p })
|
||||
Value read 41 "".v = { val (x, y ) = it }
|
||||
Value read 19 p[0] = { val (x, y) = it }
|
||||
Value read 25 takeExtFun { val (x, y) = this }
|
||||
Value read 27 takeFun1 { val (x, y) = it }
|
||||
Value read 28 takeFun2 { a, n -> val (x, y) = a!! }
|
||||
Value read 29 takeFun3 { val (x, y) = it[0] }
|
||||
Value read 31 x(p) { val (x, y) = it }
|
||||
Value read 32 x(p, fun (p) { val (x, y) = p })
|
||||
Value read 40 "".v = { val (x, y ) = it }
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>n: Int, val s: String)
|
||||
|
||||
@@ -34,3 +33,5 @@ fun y2(a: A): Boolean = condition(a)
|
||||
fun y3(a: A) {
|
||||
condition(a)
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 20 val (x1, y1) = if (b) {
|
||||
Value read 21 A(1, "").apply { val (x2, y2) = this }
|
||||
Value read 19 val (x1, y1) = if (b) {
|
||||
Value read 20 A(1, "").apply { val (x2, y2) = this }
|
||||
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int) {
|
||||
fun f() {
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
data class A(val <caret>a: A?, val n: Int)
|
||||
|
||||
fun f(a: A) {
|
||||
val (a1, n1) = a
|
||||
val (a2, n2) =
|
||||
a?.a ?: return
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Value read 7 val (a1, n1) = a
|
||||
Value read 8 val (a2, n2) =
|
||||
Value read 9 a?.a ?: return
|
||||
Value read 6 val (a1, n1) = a
|
||||
Value read 7 val (a2, n2) =
|
||||
Value read 8 a?.a ?: return
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Value read 7 val (a1, n1) = a
|
||||
Value read 8 val (a2, n2) =
|
||||
Value read 9 a?.a ?: return
|
||||
Value read 6 val (a1, n1) = a
|
||||
Value read 7 val (a2, n2) =
|
||||
Value read 8 a?.a ?: return
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
data class A(val <caret>b: B, val n: Int)
|
||||
data class B(val a: A?, val s: String)
|
||||
|
||||
@@ -5,3 +5,5 @@ package test
|
||||
class <caret>Foo {
|
||||
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -11,3 +11,5 @@ open class <caret>Server {
|
||||
println("Server")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -4,3 +4,5 @@ package testing
|
||||
|
||||
class <caret>Server() {
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Field declaration 4 private Server myServer = new Server();
|
||||
Method parameter declaration 6 public void setServer(Server server) {
|
||||
Method return type 10 public Server getMyServer() {
|
||||
New instance creation 4 private Server myServer = new Server();
|
||||
New instance creation 4 private Server myServer = new Server();
|
||||
+2
@@ -4,3 +4,5 @@ package testing
|
||||
|
||||
class <caret>Server() {
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -35,3 +35,5 @@ open class A: X {
|
||||
println("!$s!")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -35,3 +35,5 @@ open class <caret>A: X {
|
||||
println("!$s!")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
@@ -3,3 +3,5 @@
|
||||
open class <caret>A {
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -1,8 +1,9 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
data class <caret>Data
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages, skipImports
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
@@ -9,3 +8,5 @@ open class <caret>Server {
|
||||
println("Server")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: functionUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface <caret>X {
|
||||
val a: String
|
||||
@@ -37,3 +36,5 @@ open class A: X {
|
||||
println("!$s!")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: functionUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface X {
|
||||
val a: String
|
||||
@@ -37,3 +36,5 @@ open class <caret>A: X {
|
||||
println("!$s!")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: propertyUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface <caret>X {
|
||||
val a: String
|
||||
@@ -37,3 +36,5 @@ open class A: X {
|
||||
println("!$s!")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: propertyUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface X {
|
||||
val a: String
|
||||
@@ -37,3 +36,5 @@ open class <caret>A(val t: String, var u: String): X {
|
||||
println("!$s!")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
@@ -11,3 +11,5 @@ public open class Outer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun foo(): Any {
|
||||
class <caret>Bar
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun foo(): Any {
|
||||
if (false) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
class <caret>C {
|
||||
init {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
class <caret>A<T>
|
||||
|
||||
|
||||
@@ -24,4 +24,5 @@ enum class E {
|
||||
open fun <caret>foo(n: Int): Int = n
|
||||
}
|
||||
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_IGNORE
|
||||
+2
-1
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: textOccurrences
|
||||
// FIR_COMPARISON
|
||||
|
||||
package test
|
||||
|
||||
@@ -9,3 +8,5 @@ class Foo {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun foo() {
|
||||
fun <caret>bar() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun foo() {
|
||||
if (true) {
|
||||
|
||||
+2
@@ -13,3 +13,5 @@ class Client {
|
||||
processRequest()
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+3
-2
@@ -1,7 +1,6 @@
|
||||
// IGNORE: see KotlinFindUsagesHandlerFactory: it is ambiguous case: ImportAlias does not have any reference to be resolved
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtImportAlias
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package c
|
||||
|
||||
@@ -16,4 +15,6 @@ fun test() {
|
||||
a(1)
|
||||
b()
|
||||
b(1)
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
@@ -9,3 +9,5 @@ public open class Outer() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
|
||||
+1
@@ -4,3 +4,4 @@ package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
Vendored
+1
@@ -6,3 +6,4 @@ package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages, skipImports
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
Vendored
+1
@@ -5,3 +5,4 @@ package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
+3
-1
@@ -8,4 +8,6 @@ interface TraitWithImpl {
|
||||
|
||||
public class TraitWithDelegatedWithImpl(f: TraitWithImpl): TraitWithImpl by f
|
||||
|
||||
fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
|
||||
// FIR_COMPARISON
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
[kotlinTraitImplThroughDelegate.0.kt] Function call 11 fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
[kotlinTraitImplThroughDelegate.1.java] Unclassified usage 7 some.foo();
|
||||
[kotlinTraitImplThroughDelegate.1.java] Unclassified usage 7 some.foo();
|
||||
+3
-1
@@ -8,4 +8,6 @@ interface TraitNoImpl {
|
||||
|
||||
public class TraitWithDelegatedNoImpl(f: TraitNoImpl): TraitNoImpl by f
|
||||
|
||||
fun test(twdni: TraitWithDelegatedNoImpl) = twdni.foo()
|
||||
fun test(twdni: TraitWithDelegatedNoImpl) = twdni.foo()
|
||||
|
||||
// FIR_COMPARISON
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
[kotlinTraitNoImplThroughDelegate.0.kt] Function call 11 fun test(twdni: TraitWithDelegatedNoImpl) = twdni.foo()
|
||||
[kotlinTraitNoImplThroughDelegate.1.java] Unclassified usage 7 some.foo();
|
||||
[kotlinTraitNoImplThroughDelegate.1.java] Unclassified usage 7 some.foo();
|
||||
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
class Foo {
|
||||
private val localObject = object : Any() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
class Foo {
|
||||
companion object {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
private val localObject = object : Any() {
|
||||
fun <caret>f() {
|
||||
|
||||
+1
@@ -14,3 +14,4 @@ fun main(a: A) {
|
||||
}
|
||||
|
||||
// for KT-3769 Find usages gives no result for overrides
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -26,4 +26,5 @@ fun test() {
|
||||
B().p = 1
|
||||
}
|
||||
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_IGNORE
|
||||
+2
-1
@@ -27,4 +27,5 @@ fun test() {
|
||||
B().p = 1
|
||||
}
|
||||
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_IGNORE
|
||||
+2
-1
@@ -27,4 +27,5 @@ fun test() {
|
||||
B().p = 1
|
||||
}
|
||||
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_IGNORE
|
||||
@@ -5,3 +5,4 @@ object <caret>O {
|
||||
var foo: String = "foo"
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
Class static member access 7 System.out.println("foo = " + O.INSTANCE.getFoo());
|
||||
Usage in import 3 import server.O;
|
||||
Usage in import 3 import server.O;
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
import Imported as Alias
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
@@ -7,3 +6,4 @@ object <caret>O {
|
||||
var foo: String = "foo"
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtPrimaryConstructor
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
class <caret>() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+2
@@ -14,3 +14,5 @@ open class B: A<String>("") {
|
||||
println("set:" + value)
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
@@ -14,3 +14,5 @@ open class B: A<String>("") {
|
||||
println("set:" + value)
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+2
@@ -14,3 +14,5 @@ open class B: A<String>("") {
|
||||
println("set:" + value)
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun foo(): String {
|
||||
val <caret>bar = ""
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
fun foo(): String {
|
||||
if (true) {
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
class Outer {
|
||||
val x = Outer.t
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
// FIR_COMPARISON
|
||||
|
||||
class P
|
||||
|
||||
|
||||
Vendored
+3
-1
@@ -26,4 +26,6 @@ class C : B() {
|
||||
|
||||
fun test() {
|
||||
B()
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+3
-1
@@ -22,4 +22,6 @@ class C: B("") {
|
||||
|
||||
fun test() {
|
||||
B("")
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// FILTERING_RULES: org.jetbrains.kotlin.idea.findUsages.KotlinImportFilteringRule
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package testing
|
||||
|
||||
public class <caret>Test
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
-1
@@ -24,4 +24,5 @@ enum class E {
|
||||
internal open fun <caret>foo(n: Int): Int = n
|
||||
}
|
||||
|
||||
// DISABLE-ERRORS
|
||||
// DISABLE-ERRORS
|
||||
// FIR_IGNORE
|
||||
Vendored
+1
-1
@@ -1,8 +1,8 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
internal fun <caret>processRequest() = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
Vendored
+2
-2
@@ -1,6 +1,5 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages, skipImports
|
||||
// FIR_COMPARISON
|
||||
package server
|
||||
|
||||
interface TraitWithImpl {
|
||||
@@ -11,4 +10,5 @@ public class TraitWithDelegatedWithImpl(f: TraitWithImpl): TraitWithImpl by f
|
||||
|
||||
fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
|
||||
// ERROR: Modifier 'internal' is not applicable inside 'interface'
|
||||
// ERROR: Modifier 'internal' is not applicable inside 'interface'
|
||||
// FIR_COMPARISON
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 12 fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
Function call 11 fun test(twdwi: TraitWithDelegatedWithImpl) = twdwi.foo()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user