[Analysis API FIR]: fix a freeze on rendering of invalid type arguments
^KT-61750 fixed
This commit is contained in:
committed by
Space Team
parent
b41e5abcfa
commit
209d59440b
+6
@@ -246,5 +246,11 @@ public class Fe10IdeNormalAnalysisSourceModuleRendererTestGenerated extends Abst
|
|||||||
public void testContextFunctionTypes() throws Exception {
|
public void testContextFunctionTypes() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extraTypeArguments.kt")
|
||||||
|
public void testExtraTypeArguments() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/extraTypeArguments.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.fir.types.toConeTypeProjection
|
|||||||
internal object ErrorClassTypeQualifierBuilder {
|
internal object ErrorClassTypeQualifierBuilder {
|
||||||
fun createQualifiersForUnresolvedType(
|
fun createQualifiersForUnresolvedType(
|
||||||
coneDiagnostic: ConeUnresolvedError,
|
coneDiagnostic: ConeUnresolvedError,
|
||||||
builder: KtSymbolByFirBuilder
|
builder: KtSymbolByFirBuilder,
|
||||||
): List<KtClassTypeQualifier> {
|
): List<KtClassTypeQualifier> {
|
||||||
return when (coneDiagnostic) {
|
return when (coneDiagnostic) {
|
||||||
is ConeUnresolvedTypeQualifierError ->
|
is ConeUnresolvedTypeQualifierError ->
|
||||||
@@ -53,7 +53,7 @@ internal object ErrorClassTypeQualifierBuilder {
|
|||||||
firSymbol: FirClassLikeSymbol<*>,
|
firSymbol: FirClassLikeSymbol<*>,
|
||||||
builder: KtSymbolByFirBuilder
|
builder: KtSymbolByFirBuilder
|
||||||
): List<KtClassTypeQualifier.KtResolvedClassTypeQualifier> {
|
): List<KtClassTypeQualifier.KtResolvedClassTypeQualifier> {
|
||||||
return generateSequence(firSymbol) { firSymbol.getContainingClassSymbol(builder.rootSession) }.mapTo(mutableListOf()) { classSymbol ->
|
return generateSequence(firSymbol) { it.getContainingClassSymbol(builder.rootSession) }.mapTo(mutableListOf()) { classSymbol ->
|
||||||
KtClassTypeQualifier.KtResolvedClassTypeQualifier(
|
KtClassTypeQualifier.KtResolvedClassTypeQualifier(
|
||||||
builder.classifierBuilder.buildClassLikeSymbol(classSymbol),
|
builder.classifierBuilder.buildClassLikeSymbol(classSymbol),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
|
|||||||
+6
@@ -246,5 +246,11 @@ public class FirIdeDependentAnalysisSourceModuleRendererTestGenerated extends Ab
|
|||||||
public void testContextFunctionTypes() throws Exception {
|
public void testContextFunctionTypes() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extraTypeArguments.kt")
|
||||||
|
public void testExtraTypeArguments() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/extraTypeArguments.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -246,5 +246,11 @@ public class FirIdeNormalAnalysisSourceModuleRendererTestGenerated extends Abstr
|
|||||||
public void testContextFunctionTypes() throws Exception {
|
public void testContextFunctionTypes() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extraTypeArguments.kt")
|
||||||
|
public void testExtraTypeArguments() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/extraTypeArguments.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -246,5 +246,11 @@ public class FirStandaloneNormalAnalysisSourceModuleRendererTestGenerated extend
|
|||||||
public void testContextFunctionTypes() throws Exception {
|
public void testContextFunctionTypes() throws Exception {
|
||||||
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/contextFunctionTypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extraTypeArguments.kt")
|
||||||
|
public void testExtraTypeArguments() throws Exception {
|
||||||
|
runTest("analysis/analysis-api/testData/components/symbolDeclarationRenderer/renderDeclaration/types/extraTypeArguments.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
interface AAA<T> {
|
||||||
|
class BBB : AAA<Int>
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(): ERROR
|
||||||
|
|
||||||
|
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
import AAA.BBB
|
||||||
|
|
||||||
|
public interface AAA<T> {
|
||||||
|
class BBB : AAA<Int>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun foo() : BBB<*> {
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
interface AAA<T> {
|
||||||
|
class BBB : AAA<Int>
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(): BBB.AAA
|
||||||
Reference in New Issue
Block a user