[AA FIR] fix exception from vararg parameter with invalid type
It is true that for vararg parameter `arrayElementType` always have to be not null, but it required resolution to TYPES phase. But in case of the error type, the type reference is treated as resolved, so we are not obligatory to resolve such reference to TYPES, because we already have the resolved type. So we can make the rule of KtFirValueParameterSymbol#returnType less strict, and varargElementType will effectively do the same as lazy resolve + arrayElementType ^KT-61422 Fixed
This commit is contained in:
+6
@@ -453,6 +453,12 @@ public class SymbolLightClassesByPsiForLibraryTestGenerated extends AbstractSymb
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varargParameterWithoutType.kt")
|
||||
public void testVarargParameterWithoutType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/varargParameterWithoutType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardOptimization.kt")
|
||||
public void testWildcardOptimization() throws Exception {
|
||||
|
||||
+6
@@ -453,6 +453,12 @@ public class SymbolLightClassesEqualityByPsiForLibraryTestGenerated extends Abst
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varargParameterWithoutType.kt")
|
||||
public void testVarargParameterWithoutType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/varargParameterWithoutType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardOptimization.kt")
|
||||
public void testWildcardOptimization() throws Exception {
|
||||
|
||||
+6
@@ -453,6 +453,12 @@ public class SymbolLightClassesParentingByPsiForLibraryTestGenerated extends Abs
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varargParameterWithoutType.kt")
|
||||
public void testVarargParameterWithoutType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/varargParameterWithoutType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardOptimization.kt")
|
||||
public void testWildcardOptimization() throws Exception {
|
||||
|
||||
+6
@@ -453,6 +453,12 @@ public class SymbolLightClassesByPsiForSourceTestGenerated extends AbstractSymbo
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varargParameterWithoutType.kt")
|
||||
public void testVarargParameterWithoutType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/varargParameterWithoutType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardOptimization.kt")
|
||||
public void testWildcardOptimization() throws Exception {
|
||||
|
||||
+6
@@ -453,6 +453,12 @@ public class SymbolLightClassesEqualityByPsiForSourceTestGenerated extends Abstr
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varargParameterWithoutType.kt")
|
||||
public void testVarargParameterWithoutType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/varargParameterWithoutType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardOptimization.kt")
|
||||
public void testWildcardOptimization() throws Exception {
|
||||
|
||||
+6
@@ -453,6 +453,12 @@ public class SymbolLightClassesParentingByPsiForSourceTestGenerated extends Abst
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/valueClassInSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varargParameterWithoutType.kt")
|
||||
public void testVarargParameterWithoutType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByPsi/facades/varargParameterWithoutType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardOptimization.kt")
|
||||
public void testWildcardOptimization() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user