[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:
Dmitrii Gridin
2023-08-23 17:25:56 +02:00
parent 6e4d033f89
commit 2f8a64fff2
21 changed files with 255 additions and 10 deletions
@@ -0,0 +1,3 @@
public final class VarargParameterWithoutTypeKt /* VarargParameterWithoutTypeKt*/ {
public static final /* vararg */ void someFun(error.NonExistentClass...);// someFun(error.NonExistentClass[])
}
@@ -0,0 +1,3 @@
public final class VarargParameterWithoutTypeKt /* VarargParameterWithoutTypeKt*/ {
public static final /* vararg */ void someFun(@org.jetbrains.annotations.NotNull() error.NonExistentClass...);// someFun(error.NonExistentClass[])
}
@@ -0,0 +1,3 @@
fun someFun(vararg values: )
// COMPILATION_ERRORS