[FIR-TEST] Move analysis tests to separate module

This commit is contained in:
Dmitriy Novozhilov
2020-03-18 15:10:46 +03:00
parent 3a479d5d16
commit cc07ae96b3
1477 changed files with 1001 additions and 980 deletions
@@ -0,0 +1,28 @@
// !DUMP_CFG
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
abstract class DelegateProvider<in Type>
fun <Type : Base, Base : DelegateProvider<Base>, Target : Any> Type.delegate(
factory: () -> ReadWriteProperty<Type, Target>
): ReadWriteProperty<Type, Target> = null!!
class IssueListView : DelegateProvider<IssueListView>() {
fun updateFrom(any: Any) {}
}
class IssuesListUserProfile : DelegateProvider<IssuesListUserProfile>() {
var issueListView by delegate {
object : ReadWriteProperty<IssuesListUserProfile, IssueListView> {
override fun getValue(thisRef: IssuesListUserProfile, property: KProperty<*>): IssueListView {
return IssueListView()
}
override fun setValue(thisRef: IssuesListUserProfile, property: KProperty<*>, value: IssueListView) {
return IssueListView().updateFrom(value)
}
}
}
}