[FIR] Create this reference for getValue calls in delegates with proper type
^KT-57288 Fixed
This commit is contained in:
committed by
Space Team
parent
823c60a7dc
commit
16872f7a74
+21
@@ -0,0 +1,21 @@
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-57288
|
||||
import kotlin.properties.ReadWriteProperty
|
||||
|
||||
interface Delegate<R, T> : ReadWriteProperty<R, T> {
|
||||
infix fun resource(factory: Factory<R, T>): Delegate<R, T>
|
||||
}
|
||||
|
||||
interface Factory<Source, Target>
|
||||
|
||||
interface Some
|
||||
|
||||
fun <Self : Some, Target : Some> Self.delegateOf(clazz: Class<Target>): Delegate<Self, Target?> = null!!
|
||||
|
||||
abstract class SomeImpl<R : Some> : Some {
|
||||
abstract val type: Class<R>
|
||||
|
||||
var bundle by delegateOf(type) resource getFactory()
|
||||
|
||||
fun <M : SomeImpl<T>, T : Some> getFactory(): Factory<M, T?> = null!!
|
||||
}
|
||||
Reference in New Issue
Block a user