Uast: testing resolve for method called on variables of parametrized types

This commit is contained in:
Nicolay Mitropolsky
2019-02-28 15:27:59 +03:00
parent 5268cd4663
commit ec1badf60d
3 changed files with 54 additions and 19 deletions
+12 -1
View File
@@ -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()
}
}