FE: don't approximate type variable based types for public/local declarations
#KT-58618 Fixed
This commit is contained in:
committed by
Space Team
parent
2cfa3d7e0d
commit
6e58ba8f33
+4
-3
@@ -1,12 +1,13 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
// Definitions
|
||||
class State<T>(var value: T)
|
||||
<!NOTHING_TO_INLINE!>inline<!> operator fun <T> State<T>.getValue(thisRef: Any?, property: KProperty<*>): T = value
|
||||
inline fun <T> remember(block: () -> T): T = block()
|
||||
class State<S>(var value: S)
|
||||
<!NOTHING_TO_INLINE!>inline<!> operator fun <V> State<V>.getValue(thisRef: Any?, property: KProperty<*>): V = value
|
||||
inline fun <M> remember(block: () -> M): M = block()
|
||||
|
||||
// list should have a type of List<Int>, not Any?
|
||||
val list by remember { State(listOf(0)) }
|
||||
|
||||
Reference in New Issue
Block a user