Inline refactoring: should add explicit type argument for parameters

#KT-17402 Fixed
This commit is contained in:
Dmitry Gridin
2020-06-26 10:11:50 +07:00
parent 45234c9784
commit c3b726f10a
14 changed files with 111 additions and 11 deletions
@@ -0,0 +1,8 @@
interface SomeFace
interface GeneOut<out T> {}
object Empty : GeneOut<Nothing>
fun <T> downUnder(): GeneOut<T> = Empty
fun downReturn<caret>(): GeneOut<SomeFace> = downUnder()
fun callDown() {
val v1 = downReturn()
}
@@ -0,0 +1,7 @@
interface SomeFace
interface GeneOut<out T> {}
object Empty : GeneOut<Nothing>
fun <T> downUnder(): GeneOut<T> = Empty
fun callDown() {
val v1 = downUnder<SomeFace>()
}
@@ -5,6 +5,5 @@ fun <T> downUnder(): GeneOut<T> = Empty
fun downParameter(p: GeneOut<SomeFace>) = p
fun callDown() {
// BUG: KT-17402
val v2 = <caret>downParameter(downUnder())
}
@@ -4,6 +4,5 @@ object Empty : GeneOut<Nothing>
fun <T> downUnder(): GeneOut<T> = Empty
fun callDown() {
// BUG: KT-17402
val v2 = downUnder()
val v2 = downUnder<SomeFace>()
}