[FIR IDE] Add find usages tests for FIR plugin
This commit is contained in:
@@ -23,10 +23,7 @@ import org.jetbrains.kotlin.asJava.classes.AbstractUltraLightFacadeClassTest
|
||||
import org.jetbrains.kotlin.asJava.classes.AbstractUltraLightScriptLoadingTest
|
||||
import org.jetbrains.kotlin.checkers.*
|
||||
import org.jetbrains.kotlin.copyright.AbstractUpdateKotlinCopyrightTest
|
||||
import org.jetbrains.kotlin.findUsages.AbstractFindUsagesTest
|
||||
import org.jetbrains.kotlin.findUsages.AbstractFindUsagesWithDisableComponentSearchTest
|
||||
import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithLibraryTest
|
||||
import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithStdlibTest
|
||||
import org.jetbrains.kotlin.findUsages.*
|
||||
import org.jetbrains.kotlin.fir.plugin.AbstractFirAllOpenDiagnosticTest
|
||||
import org.jetbrains.kotlin.formatter.AbstractFormatterTest
|
||||
import org.jetbrains.kotlin.formatter.AbstractTypingIndentationTestBase
|
||||
@@ -1067,6 +1064,27 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("idea/idea-fir/tests", "idea/testData/findUsages") {
|
||||
|
||||
testClass<AbstractFindUsagesFirTest> {
|
||||
model("kotlin", pattern = """^(.+)\.0\.(kt|kts)$""")
|
||||
model("java", pattern = """^(.+)\.0\.java$""")
|
||||
model("propertyFiles", pattern = """^(.+)\.0\.properties$""")
|
||||
}
|
||||
|
||||
testClass<AbstractFindUsagesWithDisableComponentSearchFirTest> {
|
||||
model("kotlin/conventions/components", pattern = """^(.+)\.0\.(kt|kts)$""")
|
||||
}
|
||||
|
||||
testClass<AbstractKotlinFindUsagesWithLibraryFirTest> {
|
||||
model("libraryUsages", pattern = """^(.+)\.0\.kt$""")
|
||||
}
|
||||
|
||||
testClass<AbstractKotlinFindUsagesWithStdlibFirTest> {
|
||||
model("stdlibUsages", pattern = """^(.+)\.0\.kt$""")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("idea/scripting-support/test", "idea/scripting-support/testData") {
|
||||
testClass<AbstractScratchRunActionTest> {
|
||||
model(
|
||||
|
||||
+1834
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.findUsages
|
||||
|
||||
import org.jetbrains.kotlin.doTestWithFIRFlags
|
||||
|
||||
class FindUsagesMultiModuleFirTest : FindUsagesMultiModuleTest() {
|
||||
override val isFirPlugin: Boolean = true
|
||||
|
||||
override fun doFindUsagesTest() = doTestWithFIRFlags(mainFile.text) {
|
||||
super.doFindUsagesTest()
|
||||
}
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.findUsages;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("idea/testData/findUsages/kotlin/conventions/components")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class FindUsagesWithDisableComponentSearchFirTestGenerated extends AbstractFindUsagesWithDisableComponentSearchFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInComponents() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions/components"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("callableReferences.0.kt")
|
||||
public void testCallableReferences() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectAccess.0.kt")
|
||||
public void testCompanionObjectAccess() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("componentFunForGenericType1.0.kt")
|
||||
public void testComponentFunForGenericType1() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("componentFunForGenericType2.0.kt")
|
||||
public void testComponentFunForGenericType2() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dataClass.0.kt")
|
||||
public void testDataClass() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dataClassComponentByRef.0.kt")
|
||||
public void testDataClassComponentByRef() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dataClassFromStdlib.0.kt")
|
||||
public void testDataClassFromStdlib() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassFromStdlib.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dataClassInsideDataClass.0.kt")
|
||||
public void testDataClassInsideDataClass() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionComponentFun.0.kt")
|
||||
public void testExtensionComponentFun() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("for.0.kt")
|
||||
public void testFor() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/for.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("isAndAs.0.kt")
|
||||
public void testIsAndAs() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdas.0.kt")
|
||||
public void testLambdas() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("mayTypeAffectAncestors.0.kt")
|
||||
public void testMayTypeAffectAncestors() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberComponentFun.0.kt")
|
||||
public void testMemberComponentFun() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("operators.0.kt")
|
||||
public void testOperators() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/operators.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("recursiveDataClass1.0.kt")
|
||||
public void testRecursiveDataClass1() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("recursiveDataClass2.0.kt")
|
||||
public void testRecursiveDataClass2() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SAM.0.kt")
|
||||
public void testSAM() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("when.0.kt")
|
||||
public void testWhen() throws Exception {
|
||||
runTest("idea/testData/findUsages/kotlin/conventions/components/when.0.kt");
|
||||
}
|
||||
}
|
||||
idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryFirTestGenerated.java
Generated
+172
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.findUsages;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("idea/testData/findUsages/libraryUsages")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class KotlinFindUsagesWithLibraryFirTestGenerated extends AbstractKotlinFindUsagesWithLibraryFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLibraryUsages() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/findUsages/libraryUsages/javaLibrary")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class JavaLibrary extends AbstractKotlinFindUsagesWithLibraryFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInJavaLibrary() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/javaLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryClassUsages.0.kt")
|
||||
public void testLibraryClassUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryConstructorUsages.0.kt")
|
||||
public void testLibraryConstructorUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryFieldUsages.0.kt")
|
||||
public void testLibraryFieldUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryMethodUsages.0.kt")
|
||||
public void testLibraryMethodUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryStaticFieldUsages.0.kt")
|
||||
public void testLibraryStaticFieldUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryStaticMethodUsages.0.kt")
|
||||
public void testLibraryStaticMethodUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class KotlinLibrary extends AbstractKotlinFindUsagesWithLibraryFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInKotlinLibrary() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/kotlinLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryClassUsages.0.kt")
|
||||
public void testLibraryClassUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryCompanionObjectUsages.0.kt")
|
||||
public void testLibraryCompanionObjectUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryEnumEntryUsages.0.kt")
|
||||
public void testLibraryEnumEntryUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryEnumEntryUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryFunctionUsages.0.kt")
|
||||
public void testLibraryFunctionUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryMemberFunctionUsages.0.kt")
|
||||
public void testLibraryMemberFunctionUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryNestedClassMemberFunctionUsages.0.kt")
|
||||
public void testLibraryNestedClassMemberFunctionUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryNestedClassPrimaryConstructorUsages.0.kt")
|
||||
public void testLibraryNestedClassPrimaryConstructorUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryNestedClassSecondaryConstructorUsages.0.kt")
|
||||
public void testLibraryNestedClassSecondaryConstructorUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryNestedClassUsages.0.kt")
|
||||
public void testLibraryNestedClassUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryObjectUsages.0.kt")
|
||||
public void testLibraryObjectUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryPrimaryConstructorUsages.0.kt")
|
||||
public void testLibraryPrimaryConstructorUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("LibrarySecondaryConstructorUsages.0.kt")
|
||||
public void testLibrarySecondaryConstructorUsages() throws Exception {
|
||||
runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/findUsages/libraryUsages/_library")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class _library extends AbstractKotlinFindUsagesWithLibraryFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentIn_library() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/findUsages/libraryUsages/_library/library")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Library extends AbstractKotlinFindUsagesWithLibraryFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLibrary() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library/library"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+35
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.findUsages;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("idea/testData/findUsages/stdlibUsages")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class KotlinFindUsagesWithStdlibFirTestGenerated extends AbstractKotlinFindUsagesWithStdlibFirTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInStdlibUsages() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/stdlibUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("LibraryMemberFunctionUsagesInStdlib.0.kt")
|
||||
public void testLibraryMemberFunctionUsagesInStdlib() throws Exception {
|
||||
runTest("idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.0.kt");
|
||||
}
|
||||
}
|
||||
+2
@@ -24,6 +24,7 @@ import com.intellij.openapi.vfs.VfsUtilCore
|
||||
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
import com.intellij.psi.PsiClassOwner
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiJavaFile
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings
|
||||
@@ -58,6 +59,7 @@ import java.util.*
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
|
||||
abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFixtureTestCaseBase() {
|
||||
|
||||
private val exceptions = ArrayList<Throwable>()
|
||||
|
||||
protected open val captureExceptions = true
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiField
|
||||
// OPTIONS: skipWrite
|
||||
// FIR_COMPARISON
|
||||
public class A {
|
||||
public String <caret>foo = "foo";
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiMethod
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
class A {
|
||||
public void <caret>foo() {
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: com.intellij.psi.PsiMethod
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
public class Bar {
|
||||
public String getValue() {
|
||||
return "value";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package pack
|
||||
|
||||
data class A(val <caret>a: Int, val b: String)
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>a: Int, val b: Int) {
|
||||
fun f() {}
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
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()
|
||||
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()
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int) {
|
||||
companion object {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package pack
|
||||
|
||||
data class A(val <caret>n: Int, val s: String, val o: Any) {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
[dataClass.0.kt] Value read 16 val (x, y) = getThis()
|
||||
[dataClass.0.kt] Value read 24 val (x, y) = get(0)
|
||||
[dataClass.0.kt] Value read 18 val (x, y) = getThis()
|
||||
[dataClass.0.kt] Value read 26 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()
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// 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)
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 9 a.n
|
||||
Value read 10 a.n
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Function call 10 a.component1()
|
||||
Value read 11 val (x, y, z) = a
|
||||
Value read 9 a.n
|
||||
Function call 11 a.component1()
|
||||
Value read 10 a.n
|
||||
Value read 12 val (x, y, z) = a
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// 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)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 14 val (x, y, z) = a
|
||||
Value read 15 val (x, y, z) = a
|
||||
Vendored
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 14 val (x, y, z) = a
|
||||
Value read 17 val (x1, y1, z1) = a1
|
||||
Value read 15 val (x, y, z) = a
|
||||
Value read 18 val (x1, y1, z1) = a1
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>n: Int, val s: String, val o: Any) {
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Value read 11 val (x, y) = a
|
||||
Value read 7 for ((x, y, z) in arrayOf<A>()) {
|
||||
Value read 12 val (x, y) = a
|
||||
Value read 8 for ((x, y, z) in arrayOf<A>()) {
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int)
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 15 val (x, y) = list[0]
|
||||
Value read 8 val (x, y) = o
|
||||
Value read 16 val (x, y) = list[0]
|
||||
Value read 9 val (x, y) = o
|
||||
@@ -1,3 +1,3 @@
|
||||
Value read 15 val (x, y) = list[0]
|
||||
Value read 8 val (x, y) = o
|
||||
Value read 9 val (x1, y1) = A(1, "", "")
|
||||
Value read 10 val (x1, y1) = A(1, "", "")
|
||||
Value read 16 val (x, y) = list[0]
|
||||
Value read 9 val (x, y) = o
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>a: Int, val b: Int)
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Value read 28 takeFun2 { a, n -> val (x, y) = a!! }
|
||||
Value read 29 takeFun2 { a, n -> val (x, y) = a!! }
|
||||
@@ -1,8 +1,8 @@
|
||||
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 }
|
||||
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 }
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>n: Int, val s: String)
|
||||
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 19 val (x1, y1) = if (b) {
|
||||
Value read 20 A(1, "").apply { val (x2, y2) = this }
|
||||
Value read 20 val (x1, y1) = if (b) {
|
||||
Value read 21 A(1, "").apply { val (x2, y2) = this }
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>x: Int, val y: Int) {
|
||||
fun f() {
|
||||
|
||||
Vendored
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 15 val (x, y) = b1 + b2
|
||||
Value read 6 val (x, y) = this
|
||||
Value read 16 val (x, y) = b1 + b2
|
||||
Value read 7 val (x, y) = this
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
Value read 15 val (x, y) = b1 + b2
|
||||
Value read 6 val (x, y) = this
|
||||
Value read 16 val (x, y) = b1 + b2
|
||||
Value read 7 val (x, y) = this
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// 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) {
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>b: B, val n: Int)
|
||||
data class B(val a: A?, val s: String)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 8 val (b, n) = a
|
||||
Value read 9 val (b, n) = a
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 8 val (b, n) = a
|
||||
Value read 9 val (b, n) = a
|
||||
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
data class A(val <caret>a: Int, val b: Int)
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Value read 23 val (x, y) = o
|
||||
Value read 9 val (x, y) = o
|
||||
Value read 10 val (x, y) = o
|
||||
Value read 24 val (x, y) = o
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
data class <caret>Data
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages, skipImports
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
open class <caret>Server {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: functionUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface <caret>X {
|
||||
val a: String
|
||||
get() {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: functionUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface X {
|
||||
val a: String
|
||||
get() {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: propertyUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface <caret>X {
|
||||
val a: String
|
||||
get() {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: propertyUsages
|
||||
// FIR_COMPARISON
|
||||
|
||||
interface X {
|
||||
val a: String
|
||||
get() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo(): Any {
|
||||
class <caret>Bar
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
New instance creation 6 return Bar()
|
||||
New instance creation 8 return Bar()
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo(): Any {
|
||||
if (false) {
|
||||
class <caret>Bar
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
New instance creation 7 return Bar()
|
||||
New instance creation 9 return Bar()
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
|
||||
package server
|
||||
|
||||
public open class Server() {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
New instance creation 10 open fun processRequest() = Foo()
|
||||
New instance creation 12 open fun processRequest() = Foo()
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages, constructorUsages
|
||||
// FIR_IGNORE
|
||||
|
||||
class <caret>C {
|
||||
init {
|
||||
println("global")
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
New instance creation 10 C()
|
||||
New instance creation 12 C()
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class <caret>A<T>
|
||||
|
||||
typealias B = A<Int>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Type alias 5 typealias B = A<Int>
|
||||
Type alias 7 typealias B = A<Int>
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: textOccurrences
|
||||
// FIR_COMPARISON
|
||||
|
||||
package test
|
||||
|
||||
class Foo {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo() {
|
||||
fun <caret>bar() {
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 8 bar()
|
||||
Function call 10 bar()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo() {
|
||||
if (true) {
|
||||
fun <caret>bar() {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 9 bar()
|
||||
Function call 11 bar()
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// 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
|
||||
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: overloadUsages
|
||||
// FIR_IGNORE
|
||||
|
||||
interface X<T> {
|
||||
}
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -1,7 +1,7 @@
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 11 x.foo(1, 2)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 25 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 30 a.foo(1, "")
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 35 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 39 foo(s)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 13 x.foo(1, 2)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 27 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 32 a.foo(1, "")
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 37 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 41 foo(s)
|
||||
[kotlinOverloadAndExtensionUsages.1.kt] Function call 11 a.foo(0, "")
|
||||
[kotlinOverloadAndExtensionUsages.1.kt] Function call 3 super<A>.foo(t)
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package server
|
||||
|
||||
public open class Server() {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 8 open fun processRequest() = doProcessRequest()
|
||||
Function call 10 open fun processRequest() = doProcessRequest()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages, skipImports
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 11 LocalClass().f()
|
||||
Function call 13 LocalClass().f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 14 a.b.c.d
|
||||
Value read 16 a.b.c.d
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 11 localObject.f()
|
||||
Function call 13 localObject.f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 11 localObject().f()
|
||||
Function call 13 localObject().f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class Foo {
|
||||
private val localObject = object : Any() {
|
||||
fun <caret>f() {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Function call 10 localObject.f()
|
||||
Function call 12 localObject.f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class Foo {
|
||||
companion object {
|
||||
private val localObject = object : Any() {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Function call 12 localObject.f()
|
||||
Function call 14 localObject.f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
private val localObject = object : Any() {
|
||||
fun <caret>f() {
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Function call 10 localObject.f()
|
||||
Function call 12 localObject.f()
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
|
||||
// FIR_IGNORE
|
||||
|
||||
import Imported as Alias
|
||||
|
||||
object <caret>Imported
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Usage in import 2 import Imported as Alias
|
||||
Usage in import 4 import Imported as Alias
|
||||
@@ -1,4 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
object <caret>O {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package server
|
||||
|
||||
public open class Server() {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 10 open fun processRequest() = Foo
|
||||
Value read 12 open fun processRequest() = Foo
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtPrimaryConstructor
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
class <caret>() {
|
||||
|
||||
}
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo(): String {
|
||||
val <caret>bar = ""
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 6 return bar
|
||||
Value read 8 return bar
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo(): String {
|
||||
if (true) {
|
||||
val <caret>bar = ""
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 7 return bar
|
||||
Value read 9 return bar
|
||||
Vendored
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class Outer {
|
||||
val x = Outer.t
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 4 val x = Outer.t
|
||||
Value read 6 val x = Outer.t
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages, skipWrite
|
||||
// FIR_IGNORE
|
||||
package server
|
||||
|
||||
open class A<T> {
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
[kotlinPropertyReadUsages.0.kt] Value read 13 return super<A>.foo
|
||||
[kotlinPropertyReadUsages.0.kt] Value read 14 return super<A>.foo
|
||||
[kotlinPropertyReadUsages.1.kt] Value read 11 println("b.foo = ${b.foo}")
|
||||
[kotlinPropertyReadUsages.1.kt] Value read 7 println("a.foo = ${a.foo}")
|
||||
[kotlinPropertyReadUsages.1.kt] Value read 7 println("a.foo = ${a.foo}")
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
|
||||
// OPTIONS: usages, skipWrite
|
||||
// FIR_IGNORE
|
||||
|
||||
package server
|
||||
|
||||
open class A<T>(open var <caret>foo: T)
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
[kotlinPropertyReadUsages2.0.kt] Value read 11 return super<A>.foo
|
||||
[kotlinPropertyReadUsages2.0.kt] Value read 13 return super<A>.foo
|
||||
[kotlinPropertyReadUsages2.1.kt] Value read 11 println("b.foo = ${b.foo}")
|
||||
[kotlinPropertyReadUsages2.1.kt] Value read 7 println("a.foo = ${a.foo}")
|
||||
|
||||
Vendored
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class P
|
||||
|
||||
interface C {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user