FIR: Refine operations over OriginalProjectionTypeAttribute
It's necessary because during substitution it might be necessary to combine attributes from the original type (this) and substitution where OriginalProjectionTypeAttribute is actually expected to be null. Probably, it's worth considering some kind of assertion that `other` is always null or their projections are the same.
This commit is contained in:
+3
-11
@@ -129,17 +129,9 @@ private class FE10LikeConeSubstitutor(
|
||||
}
|
||||
|
||||
private class OriginalProjectionTypeAttribute(val data: ConeTypeProjection) : ConeAttribute<OriginalProjectionTypeAttribute>() {
|
||||
override fun union(other: OriginalProjectionTypeAttribute?): OriginalProjectionTypeAttribute? {
|
||||
return other
|
||||
}
|
||||
|
||||
override fun intersect(other: OriginalProjectionTypeAttribute?): OriginalProjectionTypeAttribute? {
|
||||
return other
|
||||
}
|
||||
|
||||
override fun add(other: OriginalProjectionTypeAttribute?): OriginalProjectionTypeAttribute? {
|
||||
return other
|
||||
}
|
||||
override fun union(other: OriginalProjectionTypeAttribute?): OriginalProjectionTypeAttribute = other ?: this
|
||||
override fun intersect(other: OriginalProjectionTypeAttribute?): OriginalProjectionTypeAttribute = other ?: this
|
||||
override fun add(other: OriginalProjectionTypeAttribute?): OriginalProjectionTypeAttribute = other ?: this
|
||||
|
||||
override fun isSubtypeOf(other: OriginalProjectionTypeAttribute?): Boolean {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user