Inline refactoring: should add explicit type argument for parameters
#KT-17402 Fixed
This commit is contained in:
+8
@@ -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()
|
||||
}
|
||||
+7
@@ -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>()
|
||||
}
|
||||
-1
@@ -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())
|
||||
}
|
||||
Vendored
+1
-2
@@ -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>()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package test.pack.one
|
||||
|
||||
interface SomeFace
|
||||
interface GeneOut<out T> {}
|
||||
object Empty : GeneOut<Nothing>
|
||||
fun <T> downUnder(): GeneOut<T> = Empty
|
||||
fun downParameter<caret>(p: GeneOut<SomeFace>): GeneOut<SomeFace> {
|
||||
p
|
||||
return p
|
||||
}
|
||||
fun callDown() {
|
||||
val v2 = downParameter(downUnder())
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test.pack.one
|
||||
|
||||
interface SomeFace
|
||||
interface GeneOut<out T> {}
|
||||
object Empty : GeneOut<Nothing>
|
||||
fun <T> downUnder(): GeneOut<T> = Empty
|
||||
fun callDown() {
|
||||
val p = downUnder<SomeFace>()
|
||||
p
|
||||
val v2 = p
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test.pack.one
|
||||
|
||||
interface SomeFace
|
||||
interface GeneOut<out T> {}
|
||||
object Empty : GeneOut<Nothing>
|
||||
fun <T> downUnder(): GeneOut<T> = Empty
|
||||
fun downParameter(p: GeneOut<SomeFace>): GeneOut<SomeFace> = p
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package test.pack.one
|
||||
|
||||
interface SomeFace
|
||||
interface GeneOut<out T> {}
|
||||
object Empty : GeneOut<Nothing>
|
||||
fun <T> downUnder(): GeneOut<T> = Empty
|
||||
@@ -0,0 +1,8 @@
|
||||
package adadawwq32q
|
||||
|
||||
import test.pack.one.downParameter
|
||||
import test.pack.one.downUnder
|
||||
|
||||
fun callDown() {
|
||||
val result = downParameter<caret>(downUnder())
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package adadawwq32q
|
||||
|
||||
import test.pack.one.SomeFace
|
||||
import test.pack.one.downUnder
|
||||
|
||||
fun callDown() {
|
||||
val result = downUnder<SomeFace>()
|
||||
}
|
||||
+1
-1
@@ -3,4 +3,4 @@ fun g() {
|
||||
if (it.isEmpty()) return@any false
|
||||
it.length < 10
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user