Add type arguments more accurately during inlining

This commit is contained in:
Mikhail Glukhikh
2017-04-12 16:43:49 +03:00
parent f8e1f5e613
commit b8cc7c2ca6
9 changed files with 68 additions and 24 deletions
@@ -0,0 +1,5 @@
fun bar(): List<Int> = listOf()
fun f() {
val vv = <caret>bar()
}
@@ -0,0 +1,3 @@
fun f() {
val vv = listOf<Int>()
}
@@ -0,0 +1,10 @@
interface SomeFace
interface GeneOut<out T> {}
object Empty : GeneOut<Nothing>
fun <T> downUnder(): GeneOut<T> = Empty
fun downParameter(p: GeneOut<SomeFace>) = p
fun callDown() {
// BUG: KT-17402
val v2 = <caret>downParameter(downUnder())
}
@@ -0,0 +1,9 @@
interface SomeFace
interface GeneOut<out T> {}
object Empty : GeneOut<Nothing>
fun <T> downUnder(): GeneOut<T> = Empty
fun callDown() {
// BUG: KT-17402
val v2 = downUnder()
}
@@ -0,0 +1,5 @@
fun bar(): List<Int> = listOf()
fun ff() {
val copy: List<Int> = ArrayList(<caret>bar())
}
@@ -0,0 +1,3 @@
fun ff() {
val copy: List<Int> = ArrayList(listOf())
}