[ANALYSIS API] introduce dedicated KtCall for incomplete code

KTIJ-23505 and duplicates
This commit is contained in:
Anna Kozlova
2022-11-14 09:51:43 +01:00
parent 725a224f74
commit e5ce32feeb
16 changed files with 235 additions and 6 deletions
@@ -0,0 +1,14 @@
KtSuccessCallInfo:
call = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = ALE<kotlin.String>
symbol = <constructor>(): ALE<T>
valueParameters = []
callableIdIfNonLocal = null
typeArgumentsMapping = {}
argumentMapping = {}
@@ -0,0 +1,5 @@
class ALE<T> {}
fun main(args: Array<String>) {
val ale = <expr>ALE<String></expr>
}
@@ -0,0 +1,19 @@
KtErrorCallInfo:
candidateCalls = [
KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = ALE<T>
symbol = <constructor>(): ALE<T>
valueParameters = []
callableIdIfNonLocal = null
typeArgumentsMapping = {
T -> (kotlin.String)
}
argumentMapping = {}
]
diagnostic = ERROR<null: Inapplicable candidate>
@@ -0,0 +1,3 @@
KtSuccessCallInfo:
call = KtGenericTypeQualifier:
qualifier = Foo<String>
@@ -0,0 +1,7 @@
class Foo<T>(len : Int) {
constructor(s : String) : this(s.length) {}
}
fun f() {
<expr>Foo<String></expr>
}
@@ -0,0 +1,48 @@
KtErrorCallInfo:
candidateCalls = [
KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = Foo<T>
symbol = <constructor>(len: kotlin.Int): Foo<T>
valueParameters = [
KtVariableLikeSignature:
name = len
receiverType = null
returnType = kotlin.Int
symbol = len: kotlin.Int
callableIdIfNonLocal = null
]
callableIdIfNonLocal = null
typeArgumentsMapping = {
T -> (kotlin.String)
}
argumentMapping = {},
KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = Foo<T>
symbol = <constructor>(s: kotlin.String): Foo<T>
valueParameters = [
KtVariableLikeSignature:
name = s
receiverType = null
returnType = kotlin.String
symbol = s: kotlin.String
callableIdIfNonLocal = null
]
callableIdIfNonLocal = null
typeArgumentsMapping = {
T -> (kotlin.String)
}
argumentMapping = {}
]
diagnostic = ERROR<null: Inapplicable candidate>
@@ -0,0 +1,3 @@
KtSuccessCallInfo:
call = KtGenericTypeQualifier:
qualifier = List<String>
@@ -0,0 +1,3 @@
fun main(args: Array<Any>) {
<expr>List<String></expr> s = new ArrayList<String>()
}
@@ -0,0 +1,6 @@
KtErrorCallInfo:
candidateCalls = [
KtQualifierCall:
qualifier = List<String>
]
diagnostic = ERROR<null: Inapplicable candidate>