Remove inline function usages that break JPS compilation

This commit is contained in:
Yan Zhulanow
2018-02-14 23:20:13 +03:00
parent 07ec704228
commit 0ebcd0ad40
2 changed files with 2 additions and 2 deletions
@@ -97,7 +97,7 @@ fun <T : Any> collectProperties(kClass: KClass<T>, inheritedOnly: Boolean): List
properties.removeAll(kClass.declaredMemberProperties)
}
return properties.filter {
it.visibility == KVisibility.PUBLIC && it.findAnnotation<Transient>() == null
it.visibility == KVisibility.PUBLIC && (it.annotations.firstOrNull { it is Transient } as Transient?) == null
}
}
@@ -63,7 +63,7 @@ fun <A : CommonToolArguments> parseCommandLineArguments(args: List<String>, resu
@Suppress("UNCHECKED_CAST")
val properties = result::class.memberProperties.mapNotNull { property ->
if (property !is KMutableProperty1<*, *>) return@mapNotNull null
val argument = property.findAnnotation<Argument>() ?: return@mapNotNull null
val argument = property.annotations.firstOrNull { it is Argument } as Argument? ?: return@mapNotNull null
ArgumentField(property as KMutableProperty1<A, Any?>, argument)
}