Introduce FirResolvedTypeRef.delegatedTypeRef to see children types in IDE
This is needed to have access to resolved children types (e.g. type arguments) from IDE
This commit is contained in:
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.fir.scopes.impl.selfImportingScope
|
||||
import org.jetbrains.kotlin.fir.symbols.CallableId
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.types.FirErrorTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.FirUserTypeRef
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitorVoid
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -190,6 +191,10 @@ fun KtElement.getOrBuildFir(
|
||||
override fun visitThisReference(thisReference: FirThisReference) {}
|
||||
|
||||
override fun visitErrorTypeRef(errorTypeRef: FirErrorTypeRef) {}
|
||||
|
||||
override fun visitUserTypeRef(userTypeRef: FirUserTypeRef) {
|
||||
userTypeRef.acceptChildren(this)
|
||||
}
|
||||
})
|
||||
var current: PsiElement? = psi
|
||||
while (current is KtElement) {
|
||||
|
||||
Reference in New Issue
Block a user