[AA] KtTypeInfoProvider: introduce fullyExpandedType extension

^KTIJ-23547
^KTIJ-24141
This commit is contained in:
Dmitrii Gridin
2023-01-17 15:11:38 +01:00
committed by Space Team
parent 8ce4c4eba9
commit 09a77d261d
20 changed files with 293 additions and 34 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 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.
*/
@@ -60,6 +60,9 @@ internal class KtFe10TypeInfoProvider(
return KotlinBuiltIns.isArrayOrPrimitiveArray(elementType)
}
/** Expanded by default */
override fun fullyExpandedType(type: KtType): KtType = type
private fun KotlinType.isDenotable(): Boolean {
if (this is DefinitelyNotNullType) return false
return constructor.isDenotable &&
@@ -46,6 +46,18 @@ public class Fe10IdeNormalAnalysisSourceModuleSingleSymbolByPsiGenerated extends
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/singleSymbolByPsi"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("ExpandedParameterType.kt")
public void testExpandedParameterType() throws Exception {
runTest("analysis/analysis-api/testData/symbols/singleSymbolByPsi/ExpandedParameterType.kt");
}
@Test
@TestMetadata("ExpandedReturnType.kt")
public void testExpandedReturnType() throws Exception {
runTest("analysis/analysis-api/testData/symbols/singleSymbolByPsi/ExpandedReturnType.kt");
}
@Test
@TestMetadata("functionWithReceiverAnnotation.kt")
public void testFunctionWithReceiverAnnotation() throws Exception {