mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Kotlin] Add tests for the problematic cases leading to an exception
...about incorrect number of type args. ^KT-65803 Fixed GitOrigin-RevId: 4aa22b56320433a1f331a3a272a17a138e7de933
This commit is contained in:
committed by
intellij-monorepo-bot
parent
10ac1f2a4e
commit
01ff89641b
+5
@@ -3477,6 +3477,11 @@ public abstract class K2IntentionTestGenerated extends AbstractK2IntentionTest {
|
||||
runTest("../../../idea/tests/testData/intentions/convertReferenceToLambda/member.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("missingTypeArgument.kt")
|
||||
public void testMissingTypeArgument() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/convertReferenceToLambda/missingTypeArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleLambdaArgumentsAreNotMovedOutsideParentheses.kt")
|
||||
public void testMultipleLambdaArgumentsAreNotMovedOutsideParentheses() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/convertReferenceToLambda/multipleLambdaArgumentsAreNotMovedOutsideParentheses.kt");
|
||||
|
||||
+5
@@ -8318,6 +8318,11 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest {
|
||||
runTest("testData/intentions/convertReferenceToLambda/member.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("missingTypeArgument.kt")
|
||||
public void testMissingTypeArgument() throws Exception {
|
||||
runTest("testData/intentions/convertReferenceToLambda/missingTypeArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleLambdaArgumentsAreNotMovedOutsideParentheses.kt")
|
||||
public void testMultipleLambdaArgumentsAreNotMovedOutsideParentheses() throws Exception {
|
||||
runTest("testData/intentions/convertReferenceToLambda/multipleLambdaArgumentsAreNotMovedOutsideParentheses.kt");
|
||||
|
||||
+10
@@ -5604,6 +5604,16 @@ public abstract class K1QuickFixTestGenerated extends AbstractK1QuickFixTest {
|
||||
runTest("testData/quickfix/createFromUsage/createFunction/call/member/funWithNullableTypeParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implicitThisInLocalClassWithTypeParameterFromExtensionParent.kt")
|
||||
public void testImplicitThisInLocalClassWithTypeParameterFromExtensionParent() throws Exception {
|
||||
runTest("testData/quickfix/createFromUsage/createFunction/call/member/implicitThisInLocalClassWithTypeParameterFromExtensionParent.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implicitThisInNestedClassWithTypeParameterFromParent.kt")
|
||||
public void testImplicitThisInNestedClassWithTypeParameterFromParent() throws Exception {
|
||||
runTest("testData/quickfix/createFromUsage/createFunction/call/member/implicitThisInNestedClassWithTypeParameterFromParent.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inconsistentTypes.kt")
|
||||
public void testInconsistentTypes() throws Exception {
|
||||
runTest("testData/quickfix/createFromUsage/createFunction/call/member/inconsistentTypes.kt");
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// SKIP_ERRORS_BEFORE
|
||||
|
||||
class Test<T>
|
||||
val x = Test::<caret>toString
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// SKIP_ERRORS_BEFORE
|
||||
|
||||
class Test<T>
|
||||
val x = { test: Test<*> -> test.toString() }
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// SKIP_ERRORS_BEFORE
|
||||
|
||||
class Test<T>
|
||||
val x = { test: Test -> test.toString() }
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.createFromUsage.createCallable.CreateCallableFromUsageFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.quickFixes.createFromUsage.CreateKotlinCallableAction
|
||||
|
||||
fun <T> T.ext() {
|
||||
class Local {
|
||||
fun test() {
|
||||
f<caret>oo()
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.createFromUsage.createCallable.CreateCallableFromUsageFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.quickFixes.createFromUsage.CreateKotlinCallableAction
|
||||
|
||||
fun <T> T.ext() {
|
||||
class Local {
|
||||
fun test() {
|
||||
foo()
|
||||
}
|
||||
|
||||
private fun foo() {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.createFromUsage.createCallable.CreateCallableFromUsageFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.quickFixes.createFromUsage.CreateKotlinCallableAction
|
||||
|
||||
class A<T> {
|
||||
fun getT(): T = null!!
|
||||
|
||||
inner class B {
|
||||
fun test() {
|
||||
f<caret>oo(getT())
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// "Create function 'foo'" "true"
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.createFromUsage.createCallable.CreateCallableFromUsageFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.k2.codeinsight.quickFixes.createFromUsage.CreateKotlinCallableAction
|
||||
|
||||
class A<T> {
|
||||
fun getT(): T = null!!
|
||||
|
||||
inner class B {
|
||||
fun test() {
|
||||
foo(getT())
|
||||
}
|
||||
|
||||
private fun foo(t: T) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user