[Analysis API FIR] fix NPE of == call resolve without builtins

We should not expect builtins to be always available as they are taken from indecies.

For K1 and FIR Standalone implementations, the builtins are always available.

^KT-62957 fixed
This commit is contained in:
Ilya Kirillov
2023-10-27 16:07:27 +02:00
committed by Space Team
parent 1aa5cf031f
commit 4720a0faa7
8 changed files with 92 additions and 6 deletions
@@ -0,0 +1,31 @@
KtSuccessCallInfo:
call = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = 1
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Boolean
symbol = kotlin/Int.equals(<dispatch receiver>: kotlin.Int, other: kotlin.Any?): kotlin.Boolean
valueParameters = [
KtVariableLikeSignature:
name = other
receiverType = null
returnType = kotlin.Any?
symbol = other: kotlin.Any?
callableIdIfNonLocal = null
]
callableIdIfNonLocal = kotlin/Int.equals
typeArgumentsMapping = {}
argumentMapping = {
2 -> (KtVariableLikeSignature:
name = other
receiverType = null
returnType = kotlin.Any?
symbol = other: kotlin.Any?
callableIdIfNonLocal = null)
}
@@ -0,0 +1,5 @@
// NO_RUNTIME
fun call() {
<expr>1 == 2</expr>
}
@@ -0,0 +1,31 @@
KtSuccessCallInfo:
call = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = 1
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Boolean
symbol = kotlin/Int.equals(<dispatch receiver>: kotlin.Int, other: kotlin.Any?): kotlin.Boolean
valueParameters = [
KtVariableLikeSignature:
name = other
receiverType = null
returnType = kotlin.Any?
symbol = other: kotlin.Any?
callableIdIfNonLocal = null
]
callableIdIfNonLocal = kotlin/Int.equals
typeArgumentsMapping = {}
argumentMapping = {
2 -> (KtVariableLikeSignature:
name = other
receiverType = null
returnType = kotlin.Any?
symbol = other: kotlin.Any?
callableIdIfNonLocal = null)
}
@@ -0,0 +1 @@
null