FIR IDE: add more tests about resolving reference to type parameters
This commit is contained in:
committed by
Ilya Kirillov
parent
7f5eb3f5ff
commit
d91170ed2c
+58
-12
@@ -624,18 +624,6 @@ public class FirReferenceResolveTestGenerated extends AbstractFirReferenceResolv
|
|||||||
runTest("analysis/analysis-api/testData/referenceResolve/TypeArgumentWrongNumber.kt");
|
runTest("analysis/analysis-api/testData/referenceResolve/TypeArgumentWrongNumber.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("TypeParameterInAnonymousObject.kt")
|
|
||||||
public void testTypeParameterInAnonymousObject() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/referenceResolve/TypeParameterInAnonymousObject.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@TestMetadata("TypeParameterInFunctionLiteral.kt")
|
|
||||||
public void testTypeParameterInFunctionLiteral() throws Exception {
|
|
||||||
runTest("analysis/analysis-api/testData/referenceResolve/TypeParameterInFunctionLiteral.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ValueParameter.kt")
|
@TestMetadata("ValueParameter.kt")
|
||||||
public void testValueParameter() throws Exception {
|
public void testValueParameter() throws Exception {
|
||||||
@@ -1201,4 +1189,62 @@ public class FirReferenceResolveTestGenerated extends AbstractFirReferenceResolv
|
|||||||
runTest("analysis/analysis-api/testData/referenceResolve/qualifiedAccess/ResolvePackageOfFullyQualifiedReference.kt");
|
runTest("analysis/analysis-api/testData/referenceResolve/qualifiedAccess/ResolvePackageOfFullyQualifiedReference.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("analysis/analysis-api/testData/referenceResolve/typeParameter")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class TypeParameter {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInTypeParameter() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/referenceResolve/typeParameter"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multipleBounds.kt")
|
||||||
|
public void testMultipleBounds() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/multipleBounds.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("reified_argumentInFunctionalType.kt")
|
||||||
|
public void testReified_argumentInFunctionalType() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/reified_argumentInFunctionalType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("reified_extensionReceiver.kt")
|
||||||
|
public void testReified_extensionReceiver() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/reified_extensionReceiver.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("reified_returnType.kt")
|
||||||
|
public void testReified_returnType() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/reified_returnType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("reified_valueParameter.kt")
|
||||||
|
public void testReified_valueParameter() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/reified_valueParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("reified_valueParameter_vararg.kt")
|
||||||
|
public void testReified_valueParameter_vararg() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/reified_valueParameter_vararg.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("TypeParameterInAnonymousObject.kt")
|
||||||
|
public void testTypeParameterInAnonymousObject() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/TypeParameterInAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("TypeParameterInFunctionLiteral.kt")
|
||||||
|
public void testTypeParameterInFunctionLiteral() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/referenceResolve/typeParameter/TypeParameterInFunctionLiteral.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
fun <T> function(t: <caret>T) where T : Int, T : Long = TODO()
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
Resolved to:
|
||||||
|
0: <T : kotlin.Int & kotlin.Long>
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
inline fun <reified T> functionWithLambda(t: T, process: (<caret>T) -> Int): Int = process(t)
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
Resolved to:
|
||||||
|
0: <reified T>
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
inline fun <reified T : Any> foo(init: <caret>T.() -> Unit = {}): T {
|
||||||
|
TODO("message")
|
||||||
|
}
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
Resolved to:
|
||||||
|
0: <reified T : kotlin.Any>
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
inline fun <reified T> function2(t: T, i: Int, s: String): <caret>T = t
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
Resolved to:
|
||||||
|
0: <reified T>
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
inline fun <reified T> functionWithLambda(t: <caret>T, process: (T) -> Int): Int = process(t)
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
Resolved to:
|
||||||
|
0: <reified T>
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
inline fun <reified T> functionWithVararg(i: Int?, vararg t: <caret>T): T = t[0]
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
Resolved to:
|
||||||
|
0: <reified T>
|
||||||
Reference in New Issue
Block a user