FIR IDE: Generate AbstractFirParameterInfoTests (all disabled).

GitOrigin-RevId: eeb0821a6558c9feccfbca18a0ab57f64471db90
This commit is contained in:
Mark Punzalan
2022-01-22 11:09:06 +00:00
committed by intellij-monorepo-bot
parent bdb9ddc12a
commit 7379934ec2
83 changed files with 589 additions and 1 deletions
@@ -0,0 +1,26 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.kotlin.idea.fir.parameterInfo
import com.intellij.util.ThrowableRunnable
import org.jetbrains.kotlin.idea.fir.invalidateCaches
import org.jetbrains.kotlin.idea.parameterInfo.AbstractParameterInfoTest
import org.jetbrains.kotlin.idea.test.runAll
import org.jetbrains.kotlin.test.utils.IgnoreTests
import java.nio.file.Paths
abstract class AbstractFirParameterInfoTest : AbstractParameterInfoTest() {
override fun isFirPlugin() = true
override fun tearDown() {
runAll(
ThrowableRunnable { project.invalidateCaches() },
ThrowableRunnable { super.tearDown() }
)
}
override fun doTest(fileName: String) {
IgnoreTests.runTestIfNotDisabledByFileDirective(Paths.get(fileName), IgnoreTests.DIRECTIVES.IGNORE_FIR) {
super.doTest(fileName)
}
}
}
@@ -0,0 +1,475 @@
/*
* Copyright 2010-2021 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.idea.fir.parameterInfo;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.idea.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.idea.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata;
import org.jetbrains.kotlin.idea.test.TestRoot;
import org.junit.runner.RunWith;
/*
* This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}.
* DO NOT MODIFY MANUALLY.
*/
@SuppressWarnings("all")
@TestRoot("fir")
@TestDataPath("$CONTENT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo")
public class FirParameterInfoTestGenerated extends AbstractFirParameterInfoTest {
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/annotations")
public static class Annotations extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("ConstructorCall.kt")
public void testConstructorCall() throws Exception {
runTest("../idea/tests/testData/parameterInfo/annotations/ConstructorCall.kt");
}
@TestMetadata("ConstructorCallWithUseSite.kt")
public void testConstructorCallWithUseSite() throws Exception {
runTest("../idea/tests/testData/parameterInfo/annotations/ConstructorCallWithUseSite.kt");
}
@TestMetadata("FunctionCall.kt")
public void testFunctionCall() throws Exception {
runTest("../idea/tests/testData/parameterInfo/annotations/FunctionCall.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/arrayAccess")
public static class ArrayAccess extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("Overloads.kt")
public void testOverloads() throws Exception {
runTest("../idea/tests/testData/parameterInfo/arrayAccess/Overloads.kt");
}
@TestMetadata("Overloads2.kt")
public void testOverloads2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/arrayAccess/Overloads2.kt");
}
@TestMetadata("Set.kt")
public void testSet() throws Exception {
runTest("../idea/tests/testData/parameterInfo/arrayAccess/Set.kt");
}
@TestMetadata("SetTooManyArgs.kt")
public void testSetTooManyArgs() throws Exception {
runTest("../idea/tests/testData/parameterInfo/arrayAccess/SetTooManyArgs.kt");
}
@TestMetadata("Simple.kt")
public void testSimple() throws Exception {
runTest("../idea/tests/testData/parameterInfo/arrayAccess/Simple.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/functionCall")
public static class FunctionCall extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("Conflicting.kt")
public void testConflicting() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/Conflicting.kt");
}
@TestMetadata("DefaultValuesFromLib.kt")
public void testDefaultValuesFromLib() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/DefaultValuesFromLib.kt");
}
@TestMetadata("Deprecated.kt")
public void testDeprecated() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/Deprecated.kt");
}
@TestMetadata("deprecatedSinceKotlinApplicable.kt")
public void testDeprecatedSinceKotlinApplicable() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/deprecatedSinceKotlinApplicable.kt");
}
@TestMetadata("deprecatedSinceKotlinNotApplicable.kt")
public void testDeprecatedSinceKotlinNotApplicable() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/deprecatedSinceKotlinNotApplicable.kt");
}
@TestMetadata("ExtensionOnCapturedScopeChange.kt")
public void testExtensionOnCapturedScopeChange() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/ExtensionOnCapturedScopeChange.kt");
}
@TestMetadata("ExtensionOnClassObject.kt")
public void testExtensionOnClassObject() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/ExtensionOnClassObject.kt");
}
@TestMetadata("FunctionalValue1.kt")
public void testFunctionalValue1() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/FunctionalValue1.kt");
}
@TestMetadata("FunctionalValue2.kt")
public void testFunctionalValue2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/FunctionalValue2.kt");
}
@TestMetadata("FunctionalValueAndTypeAlias.kt")
public void testFunctionalValueAndTypeAlias() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/FunctionalValueAndTypeAlias.kt");
}
@TestMetadata("FunctionalValueGeneric1.kt")
public void testFunctionalValueGeneric1() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/FunctionalValueGeneric1.kt");
}
@TestMetadata("FunctionalValueGeneric2.kt")
public void testFunctionalValueGeneric2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/FunctionalValueGeneric2.kt");
}
@TestMetadata("InheritedFunctions.kt")
public void testInheritedFunctions() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/InheritedFunctions.kt");
}
@TestMetadata("InheritedWithCurrentFunctions.kt")
public void testInheritedWithCurrentFunctions() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/InheritedWithCurrentFunctions.kt");
}
@TestMetadata("Invoke.kt")
public void testInvoke() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/Invoke.kt");
}
@TestMetadata("lambdaArgument.kt")
public void testLambdaArgument() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/lambdaArgument.kt");
}
@TestMetadata("lambdaArgument2.kt")
public void testLambdaArgument2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/lambdaArgument2.kt");
}
@TestMetadata("LocalFunctionBug.kt")
public void testLocalFunctionBug() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/LocalFunctionBug.kt");
}
@TestMetadata("MixedNamedArguments.kt")
public void testMixedNamedArguments() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/MixedNamedArguments.kt");
}
@TestMetadata("MixedNamedArguments2.kt")
public void testMixedNamedArguments2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/MixedNamedArguments2.kt");
}
@TestMetadata("NamedAndDefaultParameter.kt")
public void testNamedAndDefaultParameter() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NamedAndDefaultParameter.kt");
}
@TestMetadata("NamedParameter.kt")
public void testNamedParameter() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NamedParameter.kt");
}
@TestMetadata("NamedParameter2.kt")
public void testNamedParameter2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NamedParameter2.kt");
}
@TestMetadata("NamedParameter3.kt")
public void testNamedParameter3() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NamedParameter3.kt");
}
@TestMetadata("NamedParameter4.kt")
public void testNamedParameter4() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NamedParameter4.kt");
}
@TestMetadata("NoAnnotations.kt")
public void testNoAnnotations() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NoAnnotations.kt");
}
@TestMetadata("NoShadowedDeclarations.kt")
public void testNoShadowedDeclarations() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NoShadowedDeclarations.kt");
}
@TestMetadata("NoShadowedDeclarations2.kt")
public void testNoShadowedDeclarations2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NoShadowedDeclarations2.kt");
}
@TestMetadata("NoSynthesizedParameterNames.kt")
public void testNoSynthesizedParameterNames() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NoSynthesizedParameterNames.kt");
}
@TestMetadata("NotAccessible.kt")
public void testNotAccessible() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NotAccessible.kt");
}
@TestMetadata("NotGreen.kt")
public void testNotGreen() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NotGreen.kt");
}
@TestMetadata("Nullability.kt")
public void testNullability() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/Nullability.kt");
}
@TestMetadata("NullableTypeCall.kt")
public void testNullableTypeCall() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/NullableTypeCall.kt");
}
@TestMetadata("OtherConstructorFromSecondary.kt")
public void testOtherConstructorFromSecondary() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/OtherConstructorFromSecondary.kt");
}
@TestMetadata("Println.kt")
public void testPrintln() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/Println.kt");
}
@TestMetadata("PrivateConstructor.kt")
public void testPrivateConstructor() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/PrivateConstructor.kt");
}
@TestMetadata("Simple.kt")
public void testSimple() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/Simple.kt");
}
@TestMetadata("SimpleConstructor.kt")
public void testSimpleConstructor() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SimpleConstructor.kt");
}
@TestMetadata("SmartCastReceiver.kt")
public void testSmartCastReceiver() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SmartCastReceiver.kt");
}
@TestMetadata("SmartCastReceiver2.kt")
public void testSmartCastReceiver2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SmartCastReceiver2.kt");
}
@TestMetadata("SubstituteExpectedType.kt")
public void testSubstituteExpectedType() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteExpectedType.kt");
}
@TestMetadata("SubstituteExplicitTypeArgs.kt")
public void testSubstituteExplicitTypeArgs() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteExplicitTypeArgs.kt");
}
@TestMetadata("SubstituteFromArguments1.kt")
public void testSubstituteFromArguments1() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteFromArguments1.kt");
}
@TestMetadata("SubstituteFromArguments2.kt")
public void testSubstituteFromArguments2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteFromArguments2.kt");
}
@TestMetadata("SubstituteFromArguments3.kt")
public void testSubstituteFromArguments3() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteFromArguments3.kt");
}
@TestMetadata("SubstituteFromArguments4.kt")
public void testSubstituteFromArguments4() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteFromArguments4.kt");
}
@TestMetadata("SubstituteFromArgumentsOnTyping.kt")
public void testSubstituteFromArgumentsOnTyping() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SubstituteFromArgumentsOnTyping.kt");
}
@TestMetadata("SuperConstructorCall.kt")
public void testSuperConstructorCall() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SuperConstructorCall.kt");
}
@TestMetadata("SuperConstructorFromSecondary.kt")
public void testSuperConstructorFromSecondary() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/SuperConstructorFromSecondary.kt");
}
@TestMetadata("TooManyArgs.kt")
public void testTooManyArgs() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TooManyArgs.kt");
}
@TestMetadata("TooManyArgs2.kt")
public void testTooManyArgs2() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TooManyArgs2.kt");
}
@TestMetadata("TrailingComma.kt")
public void testTrailingComma() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TrailingComma.kt");
}
@TestMetadata("TwoFunctions.kt")
public void testTwoFunctions() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TwoFunctions.kt");
}
@TestMetadata("TwoFunctionsGrey.kt")
public void testTwoFunctionsGrey() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TwoFunctionsGrey.kt");
}
@TestMetadata("TwoSmartCasts.kt")
public void testTwoSmartCasts() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TwoSmartCasts.kt");
}
@TestMetadata("TypeAliasConstructor.kt")
public void testTypeAliasConstructor() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TypeAliasConstructor.kt");
}
@TestMetadata("TypeInference.kt")
public void testTypeInference() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/TypeInference.kt");
}
@TestMetadata("UpdateOnTyping.kt")
public void testUpdateOnTyping() throws Exception {
runTest("../idea/tests/testData/parameterInfo/functionCall/UpdateOnTyping.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/typeArguments")
public static class TypeArguments extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("BaseClass.kt")
public void testBaseClass() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/BaseClass.kt");
}
@TestMetadata("ConflictingWithArgument.kt")
public void testConflictingWithArgument() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/ConflictingWithArgument.kt");
}
@TestMetadata("Constraints.kt")
public void testConstraints() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/Constraints.kt");
}
@TestMetadata("ConstructorCall.kt")
public void testConstructorCall() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/ConstructorCall.kt");
}
@TestMetadata("FunctionCall.kt")
public void testFunctionCall() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/FunctionCall.kt");
}
@TestMetadata("JavaClass.kt")
public void testJavaClass() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/JavaClass.kt");
}
@TestMetadata("Overloads.kt")
public void testOverloads() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/Overloads.kt");
}
@TestMetadata("ParameterizedClassConstructor.kt")
public void testParameterizedClassConstructor() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/ParameterizedClassConstructor.kt");
}
@TestMetadata("Reified.kt")
public void testReified() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/Reified.kt");
}
@TestMetadata("VariableType.kt")
public void testVariableType() throws Exception {
runTest("../idea/tests/testData/parameterInfo/typeArguments/VariableType.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/withLib1")
public static class WithLib1 extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("useJavaFromLib.kt")
public void testUseJavaFromLib() throws Exception {
runTest("../idea/tests/testData/parameterInfo/withLib1/useJavaFromLib.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/withLib2")
public static class WithLib2 extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("useJavaSAMFromLib.kt")
public void testUseJavaSAMFromLib() throws Exception {
runTest("../idea/tests/testData/parameterInfo/withLib2/useJavaSAMFromLib.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../idea/tests/testData/parameterInfo/withLib3")
public static class WithLib3 extends AbstractFirParameterInfoTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("useJavaSAMFromLib.kt")
public void testUseJavaSAMFromLib() throws Exception {
runTest("../idea/tests/testData/parameterInfo/withLib3/useJavaSAMFromLib.kt");
}
}
}
@@ -94,6 +94,7 @@ import org.jetbrains.kotlin.idea.fir.highlighter.AbstractFirHighlightingMetaInfo
import org.jetbrains.kotlin.idea.fir.inspections.AbstractFe10BindingIntentionTest
import org.jetbrains.kotlin.idea.fir.low.level.api.sessions.AbstractSessionsInvalidationTest
import org.jetbrains.kotlin.idea.fir.low.level.api.trackers.AbstractProjectWideOutOfBlockKotlinModificationTrackerTest
import org.jetbrains.kotlin.idea.fir.parameterInfo.AbstractFirParameterInfoTest
import org.jetbrains.kotlin.idea.fir.search.AbstractHLImplementationSearcherTest
import org.jetbrains.kotlin.idea.hierarchy.AbstractHierarchyTest
import org.jetbrains.kotlin.idea.hierarchy.AbstractHierarchyWithLibTest
@@ -1104,6 +1105,13 @@ private fun assembleWorkspace(): TWorkspace = workspace {
testClass<AbstractFirShortenRefsTest> {
model("shortenRefsFir", pattern = KT_WITHOUT_DOTS, testMethodName = "doTestWithMuting")
}
testClass<AbstractFirParameterInfoTest> {
model(
"parameterInfo", pattern = Patterns.forRegex("^([\\w\\-_]+)\\.kt$"), isRecursive = true,
excludedDirectories = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib")
)
}
}
testGroup("fir", testDataPath = "..") {
@@ -43,7 +43,7 @@ abstract class AbstractParameterInfoTest : KotlinLightCodeInsightFixtureTestCase
ThrowableRunnable { super.tearDown() },
)
protected fun doTest(fileName: String) {
protected open fun doTest(fileName: String) {
val prefix = FileUtil.getNameWithoutExtension(PathUtil.getFileName(fileName))
val mainFile = File(FileUtil.toSystemDependentName(fileName))
mainFile.parentFile
@@ -1,3 +1,4 @@
// IGNORE_FIR
annotation class Fancy
class Foo(@Fancy foo: Int)
@@ -1,3 +1,4 @@
// IGNORE_FIR
// WITH_STDLIB
annotation class Fancy
@@ -1,3 +1,4 @@
// IGNORE_FIR
annotation class Fancy
private fun abc(@Fancy foo: Int) {
@@ -1,3 +1,4 @@
// IGNORE_FIR
class A {
operator fun get(x: String) = 1
operator fun get(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
class A {
operator fun get(x: String) = 1
operator fun get(x: String, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
class A {
operator fun get(x: Int) {}
operator fun set(x: String, y: Int, value: Int) {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
class A {
@@ -1,3 +1,4 @@
// IGNORE_FIR
class C {
operator fun get(pInt: Int, pString: String){}
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
// Possible parameter info, for index, lambda and arguments.
// Test is flaky without the fix. In IDEA there's a blinking without the fix with different popups.
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun f() {
listOf(1).joinToString(<caret>)
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
@Deprecated("") fun f(x: Int) = 2
fun f(x: Int, y: Boolean) = 3
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun String.method1(fn: String.() -> Unit = {}) {}
fun String.method2(param1: Int) {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
interface A
fun A.foo(i: Int) = i
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun x(name: String, next: (name: String) -> String): String {
return next(<caret>)
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
val header = { s: String, s1: String -> }
fun header(name: String, value: Int) { }
@@ -1,3 +1,4 @@
// IGNORE_FIR
typealias Handler = (name: String) -> String
fun x(handler: Handler): String {
@@ -1,3 +1,4 @@
// IGNORE_FIR
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
fun <T> T.foo(): (item: T) -> Unit{}
@@ -1,3 +1,4 @@
// IGNORE_FIR
interface I<T> {
fun foo(t: T): (item: T) -> Unit{}
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
package test
class A {
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun foo() {
fun fff(p: String, c: Char) {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Boolean, y: Int) = 1
fun m(x: Boolean, y: Int, z: Int) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
// COMPILER_ARGUMENTS: -XXLanguage:-MixedNamedArgumentsInTheirOwnPosition
open class A(x: Int) {
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean = true, z: Long = 12345678901234, u: String = "abc\n", u0: String = "" + "123", uu: String = "$u", v: Char = '\u0000', vv: String = "asdfsdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf") = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int, y: Boolean) = 1
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(a: String = "a", b: String = "b", c: String = "c", d: String = "d") = 1
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun foo(@Suppress("UNCHECKED_CAST") p: () -> Unit){}
fun bar() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
// WITH_STDLIB
class A
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun A.some(s: String) {
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
// WITH_STDLIB
lateinit var x: java.lang.Readable
@@ -1,3 +1,4 @@
// IGNORE_FIR
class C {
fun foo(){}
protected fun foo(p: Int){}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int, y: Boolean) = 2
fun m(x: Int) = 1
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun test() {
J.foo(<caret>"1", "2", "3", "4", "5")
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
class A()
fun A.index(x: Int) : Int {
@@ -1,3 +1,4 @@
// IGNORE_FIR
class B private constructor(p: Int) {
constructor() : this(<caret>)
protected constructor(s: String) : this()
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun xprintln(x: String) {}
fun xprintln() {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
class A private constructor(f: Boolean) {
constructor(): this(true)
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
interface I
fun I.foo(p: Int): Boolean = true
@@ -1,3 +1,4 @@
// IGNORE_FIR
interface I
fun I.foo(p: Int): Boolean = true
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun test() {
foo(mapOf(<caret>))
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun test() {
mapOf<Int, String>(<caret>)
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun test() {
mapOf(<caret>1 to "")
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <T1, T2> f(p: Int, t1: T1, t2: T2){}
fun test() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <T1, T2> f(p: Int, t1: T1, t2: T2){}
fun test() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <T1, T2> f(p: Int, t: T1, pair: Pair<T1, T2>){}
fun test() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <T> f(t1: T, t2: T){}
fun test() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
protected constructor() : this(1) {}
private constructor(p: String) : this(2) {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
protected constructor() : this(1) {}
private constructor(p: String) : this(2) {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
// COMPILER_ARGUMENTS: -XXLanguage:-TrailingCommas
open class A(x: Int) {
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int, y: Int) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int, y: Boolean) = 1
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A(x: Int) {
fun m(x: Int) = 1
fun m(x: Int, y: Boolean) = 2
@@ -1,3 +1,4 @@
// IGNORE_FIR
// COMPILER_ARGUMENTS: -XXLanguage:-TrailingCommas
// See KT-14484
@@ -1,3 +1,4 @@
// IGNORE_FIR
class A(val a: Int) {
constructor(val b: String) : this(b.toInt())
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <A,B> foo(a: A, b: B): B = b
fun test(x: Any?) = foo(x, x!!<caret>).hashCode()
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun fff(p: String, c: Char) {}
fun foo() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
@Suppress("DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE")
@Deprecated("")
@DeprecatedSinceKotlin(warningSince = "1.0")
@@ -1,3 +1,4 @@
// IGNORE_FIR
@Suppress("DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE")
@Deprecated("")
@DeprecatedSinceKotlin(warningSince = "999.999")
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun test() {
foo {<caret> it.length }
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun test() {
foo({ 1 }, { 2 }) {<caret> it.length }
}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class Base<out T, in V>
class X : Base<<caret>>
@@ -1,3 +1,4 @@
// IGNORE_FIR
// Possible parameter info, for index, lambda and arguments.
// Test is flaky without the fix. In IDEA there's a blinking without the fix with different popups.
@@ -1,3 +1,4 @@
// IGNORE_FIR
// WITH_STDLIB
open class A<T1 : Any, T2, T3 : List<T1>> where T2 : Runnable, T2 : Cloneable, T3 : Runnable
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class Base<out T, in V>
val v = Base<<caret>>
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <T, V> foo(t: T): T = t
fun bar() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
// WITH_STDLIB
import java.util.*
@@ -1,3 +1,4 @@
// IGNORE_FIR
fun <T, V> foo(t: T): T = t
fun <T, V> foo(t: T, p: Int): T = t
fun <X> foo(p: Boolean, x: X) {}
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class Parameterized<A, C: Cloneable, R: Runnable>
class AC
@@ -1,3 +1,4 @@
// IGNORE_FIR
inline fun <reified T> foo(p: T) {}
fun bar() {
@@ -1,3 +1,4 @@
// IGNORE_FIR
open class A<T, V>
val v: A<String, <caret>>
@@ -1,3 +1,4 @@
// IGNORE_FIR
package test
@@ -1,3 +1,4 @@
// IGNORE_FIR
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
package test
@@ -1,3 +1,4 @@
// IGNORE_FIR
package test