FIR: set super type reference properly
This commit is contained in:
@@ -11,6 +11,8 @@ import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
interface FirSuperReference : FirReference {
|
||||
val superTypeRef: FirTypeRef
|
||||
|
||||
fun replaceSuperTypeRef(newSuperTypeRef: FirTypeRef)
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
|
||||
visitor.visitSuperReference(this, data)
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@ class FirExplicitSuperReference(
|
||||
psi: PsiElement?,
|
||||
override var superTypeRef: FirTypeRef
|
||||
) : FirAbstractElement(session, psi), FirSuperReference {
|
||||
override fun replaceSuperTypeRef(newSuperTypeRef: FirTypeRef) {
|
||||
superTypeRef = newSuperTypeRef
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
superTypeRef = superTypeRef.transformSingle(transformer, data)
|
||||
return this
|
||||
|
||||
Reference in New Issue
Block a user