[Analysis API] add few tests which checks contracts of signature substitutions
This commit is contained in:
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
class X<T> {
|
||||
fun <A> foo(): T {}
|
||||
|
||||
fun <A> A.foo1(t: T) {}
|
||||
|
||||
fun <A> foo2(a: A) {}
|
||||
|
||||
fun <A, B : Number> T.foo3(a: A): Map<B, List<A>> {}
|
||||
|
||||
fun <A, B : Collection<A>, C : A> foo4(a: A, T): B {}
|
||||
|
||||
val <A> A.bar1: T get() = 10
|
||||
|
||||
val <A> A.bar2: Map<A, T> get() = mapOf()
|
||||
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
fun <A> foo(): A {}
|
||||
|
||||
fun <A> A.foo1() {}
|
||||
|
||||
fun <A> foo2(a: A) {}
|
||||
|
||||
fun <A, B: Number> foo3(a: A): Map<B, List<A>> {}
|
||||
|
||||
fun <A, B: Collection<A>, C : A> foo4(a: A): B {}
|
||||
|
||||
val <A> A.bar1: Int get() = 10
|
||||
|
||||
val <A> A.bar2: List<A> get() = listOf(this)
|
||||
Reference in New Issue
Block a user