[FIR] Remove FirExpression.typeRef
#KT-61312 Fixed
This commit is contained in:
committed by
Space Team
parent
c4fbbe7338
commit
844ab4ee74
-1
@@ -92,7 +92,6 @@ abstract class AbstractRawFirBuilderTestCase : KtParsingTestCase(
|
||||
}
|
||||
for (property in this::class.memberProperties) {
|
||||
if (hasNoAcceptAndTransform(this::class.simpleName, property.name)) continue
|
||||
if (this is FirExpression && property.name == "typeRef") continue
|
||||
|
||||
when (val childElement = property.getter.apply { isAccessible = true }.call(this)) {
|
||||
is FirNoReceiverExpression -> continue
|
||||
|
||||
@@ -32,7 +32,4 @@ abstract class FirExpression : FirPureAbstractElement(), FirStatement {
|
||||
abstract override fun replaceAnnotations(newAnnotations: List<FirAnnotation>)
|
||||
|
||||
abstract override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirExpression
|
||||
|
||||
/** DO NOT USE! Only for temporary compatibility with Compose. Will be removed soon. KT-61312*/
|
||||
val typeRef: org.jetbrains.kotlin.fir.types.FirTypeRef get() = coneTypeOrNull?.let { org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef { type = it } } ?: org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImplWithoutSource
|
||||
}
|
||||
|
||||
-8
@@ -5,7 +5,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir.tree.generator.printer
|
||||
|
||||
import org.jetbrains.kotlin.fir.tree.generator.FirTreeBuilder
|
||||
import org.jetbrains.kotlin.fir.tree.generator.context.AbstractFirTreeBuilder
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Element
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Field
|
||||
@@ -148,14 +147,7 @@ fun SmartPrinter.printElement(element: Element) {
|
||||
println()
|
||||
println("fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement")
|
||||
}
|
||||
|
||||
if (element == FirTreeBuilder.expression) {
|
||||
println()
|
||||
println("/** DO NOT USE! Only for temporary compatibility with Compose. Will be removed soon. KT-61312*/")
|
||||
println("val typeRef: org.jetbrains.kotlin.fir.types.FirTypeRef get() = coneTypeOrNull?.let { org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef { type = it } } ?: org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImplWithoutSource")
|
||||
}
|
||||
}
|
||||
|
||||
println("}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user