[Analysis API] add testcases, add comments to tests
This commit is contained in:
+5
-1
@@ -1,11 +1,15 @@
|
|||||||
class Outer<O> {
|
class Outer<O> {
|
||||||
inner class A<X> {
|
inner class A<X>: Super<O> {
|
||||||
fun <Y> foo(x: X, y: Y): Map<X, Map<Y, O>>
|
fun <Y> foo(x: X, y: Y): Map<X, Map<Y, O>>
|
||||||
|
|
||||||
val map: Map<X, O>
|
val map: Map<X, O>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract class Super<S> {
|
||||||
|
abstract fun fromSuper(): S
|
||||||
|
}
|
||||||
|
|
||||||
fun foo(o: Outer<String>) {
|
fun foo(o: Outer<String>) {
|
||||||
val a = o.A<Int>()
|
val a = o.A<Int>()
|
||||||
println(<expr>a</expr>)
|
println(<expr>a</expr>)
|
||||||
|
|||||||
+2
@@ -1,6 +1,7 @@
|
|||||||
KtTypeScope:
|
KtTypeScope:
|
||||||
fun foo(x: kotlin.Int, y: Y): kotlin.collections.Map<kotlin.Int, kotlin.collections.Map<Y, kotlin.String>>
|
fun foo(x: kotlin.Int, y: Y): kotlin.collections.Map<kotlin.Int, kotlin.collections.Map<Y, kotlin.String>>
|
||||||
val map: kotlin.collections.Map<kotlin.Int, kotlin.String>
|
val map: kotlin.collections.Map<kotlin.Int, kotlin.String>
|
||||||
|
fun fromSuper(): kotlin.String
|
||||||
fun equals(other: kotlin.Any?): kotlin.Boolean
|
fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||||
fun hashCode(): kotlin.Int
|
fun hashCode(): kotlin.Int
|
||||||
fun toString(): kotlin.String
|
fun toString(): kotlin.String
|
||||||
@@ -9,6 +10,7 @@ fun toString(): kotlin.String
|
|||||||
Declaration Scope:
|
Declaration Scope:
|
||||||
fun <Y> foo(x: X, y: Y): kotlin.collections.Map<X, kotlin.collections.Map<Y, O>>
|
fun <Y> foo(x: X, y: Y): kotlin.collections.Map<X, kotlin.collections.Map<Y, O>>
|
||||||
val map: kotlin.collections.Map<X, O>
|
val map: kotlin.collections.Map<X, O>
|
||||||
|
fun fromSuper(): O
|
||||||
fun equals(other: kotlin.Any?): kotlin.Boolean
|
fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||||
fun hashCode(): kotlin.Int
|
fun hashCode(): kotlin.Int
|
||||||
fun toString(): kotlin.String
|
fun toString(): kotlin.String
|
||||||
|
|||||||
+28
@@ -27,6 +27,12 @@ KtVariableLikeSignature:
|
|||||||
returnType = kotlin.collections.Map<kotlin.Int, kotlin.String>
|
returnType = kotlin.collections.Map<kotlin.Int, kotlin.String>
|
||||||
symbol = val map: kotlin.collections.Map<X, O>
|
symbol = val map: kotlin.collections.Map<X, O>
|
||||||
callableIdIfNonLocal = /Outer.A.map
|
callableIdIfNonLocal = /Outer.A.map
|
||||||
|
KtFunctionLikeSignature:
|
||||||
|
receiverType = null
|
||||||
|
returnType = kotlin.String
|
||||||
|
symbol = /Outer.A.fromSuper(<dispatch receiver>: Outer.A<X, O>): O
|
||||||
|
valueParameters = []
|
||||||
|
callableIdIfNonLocal = /Outer.A.fromSuper
|
||||||
KtFunctionLikeSignature:
|
KtFunctionLikeSignature:
|
||||||
receiverType = null
|
receiverType = null
|
||||||
returnType = kotlin.Boolean
|
returnType = kotlin.Boolean
|
||||||
@@ -107,6 +113,28 @@ KtKotlinPropertySymbol:
|
|||||||
symbolKind: CLASS_MEMBER
|
symbolKind: CLASS_MEMBER
|
||||||
typeParameters: []
|
typeParameters: []
|
||||||
visibility: Public
|
visibility: Public
|
||||||
|
KtFunctionSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: /Outer.A.fromSuper
|
||||||
|
hasStableParameterNames: true
|
||||||
|
isBuiltinFunctionInvoke: false
|
||||||
|
isExtension: false
|
||||||
|
isExternal: false
|
||||||
|
isInfix: false
|
||||||
|
isInline: false
|
||||||
|
isOperator: false
|
||||||
|
isOverride: false
|
||||||
|
isStatic: false
|
||||||
|
isSuspend: false
|
||||||
|
modality: ABSTRACT
|
||||||
|
name: fromSuper
|
||||||
|
origin: SOURCE
|
||||||
|
receiverType: null
|
||||||
|
returnType: O
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: []
|
||||||
|
valueParameters: []
|
||||||
|
visibility: Public
|
||||||
KtFunctionSymbol:
|
KtFunctionSymbol:
|
||||||
annotationsList: []
|
annotationsList: []
|
||||||
callableIdIfNonLocal: kotlin/Any.equals
|
callableIdIfNonLocal: kotlin/Any.equals
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
// SUBSTITUTOR: T -> kotlin.collections.List<S>, S -> kotlin.Long
|
// SUBSTITUTOR: T -> kotlin.collections.List<S>, S -> kotlin.Long
|
||||||
|
// the test checks that function own type parameters (`S` in this test) won't be substituted recursively
|
||||||
|
|
||||||
fun <T, S> f<caret>oo(x: List<T>, y: Map<T, List<S>>, k: String): T
|
fun <T, S> f<caret>oo(x: List<T>, y: Map<T, List<S>>, k: String): T
|
||||||
Vendored
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// the test checks that function own type parameters (`S` in this test) won't be substituted recursively
|
||||||
|
|
||||||
// SUBSTITUTOR: T -> kotlin.collections.List<S>, S -> kotlin.Long
|
// SUBSTITUTOR: T -> kotlin.collections.List<S>, S -> kotlin.Long
|
||||||
|
|
||||||
fun <T, S> f<caret>oo(x: List<T>, y: Map<T, List<S>>, k: String): T
|
fun <T, S> f<caret>oo(x: List<T>, y: Map<T, List<S>>, k: String): T
|
||||||
Reference in New Issue
Block a user