[FIR] Eliminate unused FirDelegatedTypeRef

This commit is contained in:
Mikhail Glukhikh
2020-08-26 15:25:01 +03:00
parent ede910065a
commit f0af930288
17 changed files with 1 additions and 190 deletions
@@ -223,10 +223,6 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
withCopy()
}
builder(delegatedTypeRef) {
withCopy()
}
builder(functionTypeRef) {
withCopy()
}
@@ -351,7 +347,7 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
// -----------------------------------------------------------------------
findImplementationsWithElementInParents(annotationContainer) {
it.type !in setOf("FirDelegatedTypeRefImpl", "FirImplicitTypeRefImpl")
it.type !in setOf("FirImplicitTypeRefImpl")
}.forEach {
it.builder?.parents?.add(annotationContainerBuilder)
}
@@ -142,7 +142,6 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
val resolvedTypeRef = element("ResolvedTypeRef", TypeRef, typeRef)
val errorTypeRef = element("ErrorTypeRef", TypeRef, resolvedTypeRef, diagnosticHolder)
val delegatedTypeRef = element("DelegatedTypeRef", TypeRef, typeRef)
val typeRefWithNullability = element("TypeRefWithNullability", TypeRef, typeRef)
val userTypeRef = element("UserTypeRef", TypeRef, typeRefWithNullability)
val dynamicTypeRef = element("DynamicTypeRef", TypeRef, typeRefWithNullability)
@@ -434,14 +434,6 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
kind = OpenClass
}
impl(delegatedTypeRef) {
listOf("source", "annotations").forEach {
default(it) {
delegate = "typeRef"
}
}
}
impl(safeCallExpression) {
useTypes(safeCallCheckedSubjectType)
}
@@ -462,7 +454,6 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
}
val implementationWithConfigurableTypeRef = listOf(
"FirDelegatedTypeRefImpl",
"FirTypeProjectionWithVarianceImpl",
"FirCallableReferenceAccessImpl",
"FirThisReceiverExpressionImpl",
@@ -564,11 +564,6 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
+booleanField("isSuspend")
}
delegatedTypeRef.configure {
+field("delegate", expression, nullable = true)
+field(typeRef)
}
typeRefWithNullability.configure {
+booleanField("isMarkedNullable")
}