[FIR] ConeAttributes: fix plus method

The 'plus' method was actually creating a new 'ConeAttributes' with
only one new attribute due to a typo inside 'buildList'

^KT-60451
^KT-60504
This commit is contained in:
Dmitrii Gridin
2023-07-17 19:39:56 +02:00
committed by Space Team
parent c605cb9855
commit 4366164b65
8 changed files with 157 additions and 111 deletions
@@ -96,9 +96,10 @@ class ConeAttributes private constructor(attributes: List<ConeAttribute<*>>) : A
if (attribute in this) return this
if (isEmpty()) return predefinedAttributes[attribute] ?: ConeAttributes(attribute)
val newAttributes = buildList {
addAll(this)
addAll(arrayMap)
add(attribute)
}
return ConeAttributes(newAttributes)
}