Extract refactoring: Make an extracted function 'inline' if any of its type parameters are reified (#KT-23983)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
inline fun <reified T> foo() {
|
||||
<selection>T::class</selection>
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
inline fun <reified T> foo() {
|
||||
__dummyTestFun__<T>()
|
||||
}
|
||||
|
||||
inline fun <reified T> __dummyTestFun__() {
|
||||
T::class
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun <reified T : CharSequence, reified U, X> foo() {
|
||||
<selection>listOf(T::class, U::class)</selection>
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun <reified T : CharSequence, reified U, X> foo() {
|
||||
__dummyTestFun__<T, U>()
|
||||
}
|
||||
|
||||
inline fun <reified T : CharSequence, reified U> __dummyTestFun__() {
|
||||
listOf(T::class, U::class)
|
||||
}
|
||||
Reference in New Issue
Block a user