Analysis API: Add tests for KT-54648

This commit is contained in:
Kirill Rakhman
2023-01-27 16:13:03 +01:00
committed by Space Team
parent 63a908cff8
commit 5e56845ce0
9 changed files with 154 additions and 0 deletions
@@ -0,0 +1,10 @@
fun call {
val foo = CInt32VarX<Int>()
foo.<expr>value</expr> += 42
}
class CInt32VarX<T>
var <T : Int> CInt32VarX<T>.value: T
get() = TODO()
set(value) {}
@@ -0,0 +1,19 @@
KtSuccessCallInfo:
call = KtSimpleVariableAccessCall:
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = KtExplicitReceiverValue:
expression = foo
isSafeNavigation = false
type = CInt32VarX<kotlin.Int>
signature = KtVariableLikeSignature:
name = value
receiverType = CInt32VarX<kotlin.Int>
returnType = kotlin.Int
symbol = var value: T
callableIdIfNonLocal = /value
simpleAccess = Read:
typeArgumentsMapping = {
T -> (kotlin.Int)
}
@@ -0,0 +1,10 @@
fun call {
val foo = CInt32VarX<Int>()
foo.<expr>value</expr> = 42
}
class CInt32VarX<T>
var <T : Int> CInt32VarX<T>.value: T
get() = TODO()
set(value) {}
@@ -0,0 +1,19 @@
KtSuccessCallInfo:
call = KtSimpleVariableAccessCall:
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = KtExplicitReceiverValue:
expression = foo
isSafeNavigation = false
type = CInt32VarX<kotlin.Int>
signature = KtVariableLikeSignature:
name = value
receiverType = CInt32VarX<kotlin.Int>
returnType = kotlin.Int
symbol = var value: T
callableIdIfNonLocal = /value
simpleAccess = Write:
value = 42
typeArgumentsMapping = {
T -> (kotlin.Int)
}
@@ -0,0 +1,10 @@
fun call {
val foo = CInt32VarX<Int>()
<expr>++foo.value</expr>
}
class CInt32VarX<T>
var <T : Int> CInt32VarX<T>.value: T
get() = TODO()
set(value) {}
@@ -0,0 +1,32 @@
KtSuccessCallInfo:
call = KtCompoundVariableAccessCall:
compoundAccess = IncOrDecOperation:
kind = INC
precedence = PREFIX
operationPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = foo.value
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = kotlin/Int.inc(<dispatch receiver>: kotlin.Int): kotlin.Int
valueParameters = []
callableIdIfNonLocal = kotlin/Int.inc
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = KtExplicitReceiverValue:
expression = foo
isSafeNavigation = false
type = CInt32VarX<kotlin.Int>
signature = KtVariableLikeSignature:
name = value
receiverType = CInt32VarX<kotlin.Int>
returnType = kotlin.Int
symbol = var value: T
callableIdIfNonLocal = /value
typeArgumentsMapping = {
T -> (kotlin.Int)
}