// !LANGUAGE: +ForbidRecursiveDelegateExpressions // WITH_STDLIB import kotlin.properties.ReadWriteProperty import kotlin.reflect.KProperty import kotlin.reflect.KProperty1 inline fun Self.parent( property: KProperty1>): Delegate = TODO() class GitLabBuildProcessor: DatabaseEntity { var processor by ")!>parent(GitLabChangesProcessor::buildProcessors) } interface DatabaseEntity: Entity interface Entity interface ResourceFactory interface ValueFilter interface Delegate : ReadWriteProperty, ValueFilter { infix fun name(desc: KProperty<*>): String infix fun by(name: String): Delegate infix fun resource(factory: ResourceFactory): Delegate infix fun filter(filter: (R, Any?) -> Boolean): Delegate } class GitLabChangesProcessor: DatabaseEntity { var buildProcessors by >"), TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR!>child_many( GitLabBuildProcessor::class.java, GitLabBuildProcessor::processor ) } fun Self.child_many( clazz: Class, property: KProperty1, name: String = property.name ): Delegate> = TODO() // Type checking has run into a recursive problem. Easiest workaround: specify types of your declarations explicitly