Extraction Engine: Support type parameter references

#KT-7260 Fixed
This commit is contained in:
Alexey Sedunov
2015-09-25 19:56:54 +03:00
parent aa080bf201
commit 78f7e6b459
10 changed files with 116 additions and 10 deletions
@@ -0,0 +1,6 @@
// SUGGESTED_NAMES: i, getA
fun foo<U>() = 1
fun test<T>() {
val a = <selection>foo<T>()</selection>
}
@@ -0,0 +1,8 @@
// SUGGESTED_NAMES: i, getA
fun foo<U>() = 1
fun test<T>() {
val a = i<T>()
}
private fun <T> i() = foo<T>()
@@ -0,0 +1,8 @@
// SUGGESTED_NAMES: i, getA
// PARAM_DESCRIPTOR: value-parameter val t: T defined in test
// PARAM_TYPES: T
fun foo<U>(u: U) = 1
fun test<T>(t: T) {
val a = <selection>foo<T>(t)</selection>
}
@@ -0,0 +1,10 @@
// SUGGESTED_NAMES: i, getA
// PARAM_DESCRIPTOR: value-parameter val t: T defined in test
// PARAM_TYPES: T
fun foo<U>(u: U) = 1
fun test<T>(t: T) {
val a = i(t)
}
private fun <T> i(t: T) = foo<T>(t)