[Analysis API FIR] KtFirPsiTypeProvider: drop redundant TODO
Regular type annotations work as expected ^KT-62351 Obsolete
This commit is contained in:
committed by
Space Team
parent
ba421aa320
commit
5689dedea0
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2024 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.
|
||||
*/
|
||||
|
||||
@@ -138,7 +138,7 @@ internal class KtFirPsiTypeProvider(
|
||||
val javaType = JavaTypeImpl.create(psiType, javaElementSourceFactory.createTypeSource(psiType))
|
||||
|
||||
val javaTypeRef = buildJavaTypeRef {
|
||||
//TODO KT-62351
|
||||
// Annotations are unused during `resolveIfJavaType`, so there is no need to provide something
|
||||
annotationBuilder = { emptyList() }
|
||||
type = javaType
|
||||
}
|
||||
|
||||
+12
@@ -99,6 +99,18 @@ public class FirIdeDependentAnalysisSourceModuleAnalysisApiKtTypeByPsiTypeProvid
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/primitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotationOnString.kt")
|
||||
public void testTypeAnnotationOnString() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotationOnString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterWithKotlinUseSite.kt")
|
||||
public void testTypeParameterWithKotlinUseSite() {
|
||||
|
||||
+12
@@ -99,6 +99,18 @@ public class FirIdeNormalAnalysisSourceModuleAnalysisApiKtTypeByPsiTypeProviderT
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/primitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotationOnString.kt")
|
||||
public void testTypeAnnotationOnString() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotationOnString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterWithKotlinUseSite.kt")
|
||||
public void testTypeParameterWithKotlinUseSite() {
|
||||
|
||||
+12
@@ -99,6 +99,18 @@ public class FirStandaloneNormalAnalysisSourceModuleAnalysisApiKtTypeByPsiTypePr
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/primitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotationOnString.kt")
|
||||
public void testTypeAnnotationOnString() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotationOnString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameterWithKotlinUseSite.kt")
|
||||
public void testTypeParameterWithKotlinUseSite() {
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// FILE: KotlinClass.kt
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MyAnno
|
||||
|
||||
class Kotlin<caret_useSite>Class
|
||||
|
||||
// FILE: A.java
|
||||
public interface A {
|
||||
@MyAnno KotlinClass f<caret>oo();
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
PsiType: PsiType:KotlinClass
|
||||
KtType: @MyAnno KotlinClass?
|
||||
analysis/analysis-api/testData/components/psiTypeProvider/psiType/asKtType/typeAnnotationOnString.kt
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// FILE: KotlinClass.kt
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MyAnno
|
||||
|
||||
class Kotlin<caret_useSite>Class
|
||||
|
||||
// FILE: A.java
|
||||
public interface A {
|
||||
@MyAnno String f<caret>oo();
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
PsiType: PsiType:String
|
||||
KtType: @MyAnno kotlin.String?
|
||||
Reference in New Issue
Block a user