K2: drop unnecessary attributes when inferring declaration types
Related to KT-62578
This commit is contained in:
committed by
Space Team
parent
90eaf5f70f
commit
cebb6747e3
@@ -125,6 +125,11 @@ class ConeAttributes private constructor(attributes: List<ConeAttribute<*>>) : A
|
||||
})
|
||||
}
|
||||
|
||||
fun filterNecessaryToKeep(): ConeAttributes {
|
||||
return if (all { it.keepInInferredDeclarationType }) this
|
||||
else create(filter { it.keepInInferredDeclarationType })
|
||||
}
|
||||
|
||||
private inline fun perform(other: ConeAttributes, op: ConeAttribute<*>.(ConeAttribute<*>?) -> ConeAttribute<*>?): ConeAttributes {
|
||||
if (this.isEmpty() && other.isEmpty()) return this
|
||||
val attributes = mutableListOf<ConeAttribute<*>>()
|
||||
|
||||
Reference in New Issue
Block a user