Add annotation processing in joinTypeParameters method
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8b1a63b54d
commit
840e627f1f
@@ -121,11 +121,12 @@ object ConverterUtil {
|
||||
}
|
||||
|
||||
fun FirTypeParameterContainer.joinTypeParameters(typeConstraints: List<TypeConstraint>) {
|
||||
typeConstraints.forEach { (identifier, type) ->
|
||||
typeConstraints.forEach { typeConstraint ->
|
||||
this.typeParameters.forEach { typeParameter ->
|
||||
if (identifier == typeParameter.name.identifier) {
|
||||
(typeParameter as FirTypeParameterImpl).bounds += type
|
||||
typeParameter.annotations += type.annotations
|
||||
if (typeConstraint.identifier == typeParameter.name.identifier) {
|
||||
(typeParameter as FirTypeParameterImpl).bounds += typeConstraint.firTypeRef
|
||||
typeParameter.annotations += typeConstraint.firTypeRef.annotations
|
||||
typeParameter.annotations += typeConstraint.annotations
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,4 @@ package org.jetbrains.kotlin.fir.lightTree.fir
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.types.FirTypeRef
|
||||
|
||||
class TypeConstraint(val annotations: List<FirAnnotationCall>, val identifier: String, val firTypeRef: FirTypeRef) {
|
||||
operator fun component1(): String {
|
||||
return identifier
|
||||
}
|
||||
|
||||
operator fun component2(): FirTypeRef {
|
||||
return firTypeRef
|
||||
}
|
||||
}
|
||||
class TypeConstraint(val annotations: List<FirAnnotationCall>, val identifier: String, val firTypeRef: FirTypeRef)
|
||||
Reference in New Issue
Block a user