[FIR] Implement extension for providing additional type attributes
This commit is contained in:
committed by
TeamCityServer
parent
32709151c3
commit
38877ba842
@@ -89,6 +89,11 @@ object CompilerConeAttributes {
|
||||
UnsafeVariance.ANNOTATION_CLASS_ID to UnsafeVariance
|
||||
)
|
||||
|
||||
val classIdByCompilerAttribute: Map<ConeAttribute<*>, ClassId> = compilerAttributeByClassId.entries.associateBy(
|
||||
keySelector = { it.value },
|
||||
valueTransform = { it.key }
|
||||
)
|
||||
|
||||
val compilerAttributeByFqName: Map<FqName, ConeAttribute<*>> = compilerAttributeByClassId.mapKeys { it.key.asSingleFqName() }
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class ConeAttribute<T : ConeAttribute<T>> : AnnotationMarker {
|
||||
*
|
||||
* This function must be symmetrical: a.add(b) == b.add(a)
|
||||
*/
|
||||
abstract fun add(other: @UnsafeVariance T?): T
|
||||
abstract fun add(other: @UnsafeVariance T?): T?
|
||||
abstract fun isSubtypeOf(other: @UnsafeVariance T?): Boolean
|
||||
|
||||
abstract override fun toString(): String
|
||||
|
||||
Reference in New Issue
Block a user