[FIR-TEST] Move analysis tests to separate module
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class LazyDelegate<T>(val value: T) {
|
||||
operator fun getValue(thisRef: Any?, property: KProperty<*>): T = value
|
||||
}
|
||||
|
||||
fun <T> lazy(block: () -> T): LazyDelegate<T> = LazyDelegate(block())
|
||||
|
||||
fun getAny(): Any? = null
|
||||
|
||||
class Test {
|
||||
val x by lazy {
|
||||
val y = getAny() as? String ?: ""
|
||||
y
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user