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:
Mikhail Glukhikh
2019-07-31 15:46:06 +03:00
parent 38c1a50c1d
commit 8808c775a4
14 changed files with 41 additions and 5 deletions
@@ -486,13 +486,28 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
noSource()
}
impl(resolvedTypeRef)
impl(resolvedTypeRef) {
default("delegatedTypeRef") {
value = "null"
}
}
val errorTypeRefImpl = impl(errorTypeRef) {
default("type", "ConeClassErrorType(diagnostic.reason)")
default("delegatedTypeRef") {
value = "null"
withGetter = true
}
useTypes(coneClassErrorTypeType)
}
impl(resolvedFunctionTypeRef) {
default("delegatedTypeRef") {
value = "null"
withGetter = true
}
}
impl(errorFunction) {
defaultNull("receiverTypeRef", "body", withGetter = true)
default("returnTypeRef", "FirErrorTypeRefImpl(null, diagnostic)")
@@ -490,6 +490,7 @@ object NodeConfigurator : AbstractFieldConfigurator() {
resolvedTypeRef.configure {
+field("type", coneKotlinTypeType)
+field("delegatedTypeRef", typeRef, nullable = true)
}
delegatedTypeRef.configure {