AA: do not parse signature with NO_NAME_PROVIDED
^KTIJ-23503 Fixed
This commit is contained in:
committed by
Ilya Kirillov
parent
6cadad5a6b
commit
4497be0b68
+2
-2
@@ -191,10 +191,10 @@ internal fun ConeKotlinType.asPsiType(
|
||||
session.jvmTypeMapper.mapType(correctedType, mode, signatureWriter)
|
||||
|
||||
val canonicalSignature = signatureWriter.toString()
|
||||
require(!canonicalSignature.contains(SpecialNames.ANONYMOUS_STRING))
|
||||
|
||||
if (canonicalSignature.contains("L<error>")) return null
|
||||
|
||||
require(!canonicalSignature.contains(SpecialNames.ANONYMOUS_STRING))
|
||||
if (canonicalSignature.contains(SpecialNames.NO_NAME_PROVIDED.asString())) return null
|
||||
|
||||
val signature = StringCharacterIterator(canonicalSignature)
|
||||
val javaType = SignatureParsing.parseTypeString(signature, StubBuildingVisitor.GUESSING_MAPPER)
|
||||
|
||||
+12
@@ -46,6 +46,18 @@ public class FirIdeDependentAnalysisSourceModuleAnalysisApiExpressionPsiTypeProv
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forExpression"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class_object_call.kt")
|
||||
public void testClass_object_call() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forExpression/class_object_call.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class_object_constructor.kt")
|
||||
public void testClass_object_constructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forExpression/class_object_constructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParamFlexibleUpperBound.kt")
|
||||
public void testTypeParamFlexibleUpperBound() throws Exception {
|
||||
|
||||
+12
@@ -46,6 +46,18 @@ public class FirIdeNormalAnalysisSourceModuleAnalysisApiExpressionPsiTypeProvide
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forExpression"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class_object_call.kt")
|
||||
public void testClass_object_call() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forExpression/class_object_call.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("class_object_constructor.kt")
|
||||
public void testClass_object_constructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forExpression/class_object_constructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParamFlexibleUpperBound.kt")
|
||||
public void testTypeParamFlexibleUpperBound() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user