Uast: testing resolve for method called on variables of parametrized types
This commit is contained in:
+12
-1
@@ -1,4 +1,4 @@
|
||||
class A {
|
||||
open class A {
|
||||
fun foo() {}
|
||||
inline fun inlineFoo() {
|
||||
|
||||
@@ -17,3 +17,14 @@ fun bar() {
|
||||
intRange.contains(2 as Int) // extension-fun with @JvmName("longRangeContains")
|
||||
IntRange(1, 2) // constructor from stdlib
|
||||
}
|
||||
|
||||
fun <T : A> barT(t: T) {
|
||||
t.foo()
|
||||
}
|
||||
|
||||
fun <T : List<A>> barTL(listT: T) {
|
||||
listT.isEmpty()
|
||||
for (a in listT) {
|
||||
a.foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user