mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 06:51:17 +07:00
HighLevelParamInfoHandler: Enable tests related to parameter name in function types.
GitOrigin-RevId: 145aefb5a04884d66f02b6dee86508c4f2f11df3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ecbdadb6d0
commit
6fa7fdfd50
+15
@@ -312,6 +312,21 @@ public abstract class FirParameterInfoTestGenerated extends AbstractFirParameter
|
||||
runTest("../idea/tests/testData/parameterInfo/functionCall/OtherConstructorFromSecondary.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParameterNameAnnotationConflict.kt")
|
||||
public void testParameterNameAnnotationConflict() throws Exception {
|
||||
runTest("../idea/tests/testData/parameterInfo/functionCall/ParameterNameAnnotationConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParameterNameAnnotationInFunctionType.kt")
|
||||
public void testParameterNameAnnotationInFunctionType() throws Exception {
|
||||
runTest("../idea/tests/testData/parameterInfo/functionCall/ParameterNameAnnotationInFunctionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParameterNameAnnotationInNonFunctionType.kt")
|
||||
public void testParameterNameAnnotationInNonFunctionType() throws Exception {
|
||||
runTest("../idea/tests/testData/parameterInfo/functionCall/ParameterNameAnnotationInNonFunctionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Println.kt")
|
||||
public void testPrintln() throws Exception {
|
||||
runTest("../idea/tests/testData/parameterInfo/functionCall/Println.kt");
|
||||
|
||||
+15
@@ -312,6 +312,21 @@ public abstract class ParameterInfoTestGenerated extends AbstractParameterInfoTe
|
||||
runTest("testData/parameterInfo/functionCall/OtherConstructorFromSecondary.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParameterNameAnnotationConflict.kt")
|
||||
public void testParameterNameAnnotationConflict() throws Exception {
|
||||
runTest("testData/parameterInfo/functionCall/ParameterNameAnnotationConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParameterNameAnnotationInFunctionType.kt")
|
||||
public void testParameterNameAnnotationInFunctionType() throws Exception {
|
||||
runTest("testData/parameterInfo/functionCall/ParameterNameAnnotationInFunctionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ParameterNameAnnotationInNonFunctionType.kt")
|
||||
public void testParameterNameAnnotationInNonFunctionType() throws Exception {
|
||||
runTest("testData/parameterInfo/functionCall/ParameterNameAnnotationInNonFunctionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Println.kt")
|
||||
public void testPrintln() throws Exception {
|
||||
runTest("testData/parameterInfo/functionCall/Println.kt");
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_FIR
|
||||
fun x(name: String, next: (name: String) -> String): String {
|
||||
return next(<caret>)
|
||||
}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_FIR
|
||||
typealias Handler = (name: String) -> String
|
||||
|
||||
fun x(handler: Handler): String {
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
// IGNORE_FIR
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
||||
|
||||
fun <T> T.foo(): (item: T) -> Unit{}
|
||||
|
||||
fun f() {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_FIR
|
||||
interface I<T> {
|
||||
fun foo(t: T): (item: T) -> Unit{}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// @ParameterName annotation takes precedence over name in function type parameter
|
||||
fun <T> T.foo(): (notMe: @ParameterName("pickMe") T) -> Unit{}
|
||||
|
||||
fun f() {
|
||||
val v = "a".foo()
|
||||
v(<caret>)
|
||||
}
|
||||
|
||||
/*
|
||||
Text: (<highlight>pickMe: String</highlight>), Disabled: false, Strikeout: false, Green: true
|
||||
*/
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fun <T> T.foo(): Function1<@ParameterName("item") T, @ParameterName("item") Unit>
|
||||
|
||||
fun f() {
|
||||
val v = "a".foo()
|
||||
v(<caret>)
|
||||
}
|
||||
|
||||
/*
|
||||
Text: (<highlight>item: String</highlight>), Disabled: false, Strikeout: false, Green: true
|
||||
*/
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// @ParameterName annotation is ignored when not used in function type
|
||||
fun f(pickMe: @ParameterName("notMe") String) {
|
||||
f(<caret>)
|
||||
}
|
||||
|
||||
/*
|
||||
Text: (<highlight>pickMe: String</highlight>), Disabled: false, Strikeout: false, Green: true
|
||||
*/
|
||||
Reference in New Issue
Block a user