K2: reproduce KT-58618
This commit is contained in:
committed by
Space Team
parent
666239c587
commit
2cfa3d7e0d
+14
@@ -0,0 +1,14 @@
|
||||
// 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()
|
||||
|
||||
// list should have a type of List<Int>, not Any?
|
||||
val list by remember { State(listOf(0)) }
|
||||
val first = list.first()
|
||||
|
||||
Reference in New Issue
Block a user