FIR: Remove FirQualifiedAccessWithoutCallee.safe from generated code
^KT-38444 In Progress
This commit is contained in:
@@ -21,7 +21,6 @@ abstract class FirComponentCall : FirFunctionCall() {
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val typeRef: FirTypeRef
|
abstract override val typeRef: FirTypeRef
|
||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val safe: Boolean
|
|
||||||
abstract override val typeArguments: List<FirTypeProjection>
|
abstract override val typeArguments: List<FirTypeProjection>
|
||||||
abstract override val dispatchReceiver: FirExpression
|
abstract override val dispatchReceiver: FirExpression
|
||||||
abstract override val extensionReceiver: FirExpression
|
abstract override val extensionReceiver: FirExpression
|
||||||
|
|||||||
-1
@@ -21,7 +21,6 @@ abstract class FirExpressionWithSmartcast : FirQualifiedAccessExpression() {
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val typeRef: FirTypeRef
|
abstract override val typeRef: FirTypeRef
|
||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val safe: Boolean
|
|
||||||
abstract override val typeArguments: List<FirTypeProjection>
|
abstract override val typeArguments: List<FirTypeProjection>
|
||||||
abstract override val explicitReceiver: FirExpression?
|
abstract override val explicitReceiver: FirExpression?
|
||||||
abstract override val dispatchReceiver: FirExpression
|
abstract override val dispatchReceiver: FirExpression
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ abstract class FirFunctionCall : FirQualifiedAccessExpression(), FirCall {
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val typeRef: FirTypeRef
|
abstract override val typeRef: FirTypeRef
|
||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val safe: Boolean
|
|
||||||
abstract override val typeArguments: List<FirTypeProjection>
|
abstract override val typeArguments: List<FirTypeProjection>
|
||||||
abstract override val explicitReceiver: FirExpression?
|
abstract override val explicitReceiver: FirExpression?
|
||||||
abstract override val dispatchReceiver: FirExpression
|
abstract override val dispatchReceiver: FirExpression
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
interface FirQualifiedAccess : FirQualifiedAccessWithoutCallee, FirResolvable {
|
interface FirQualifiedAccess : FirQualifiedAccessWithoutCallee, FirResolvable {
|
||||||
override val source: FirSourceElement?
|
override val source: FirSourceElement?
|
||||||
override val annotations: List<FirAnnotationCall>
|
override val annotations: List<FirAnnotationCall>
|
||||||
override val safe: Boolean
|
|
||||||
override val typeArguments: List<FirTypeProjection>
|
override val typeArguments: List<FirTypeProjection>
|
||||||
override val explicitReceiver: FirExpression?
|
override val explicitReceiver: FirExpression?
|
||||||
override val dispatchReceiver: FirExpression
|
override val dispatchReceiver: FirExpression
|
||||||
|
|||||||
-1
@@ -20,7 +20,6 @@ abstract class FirQualifiedAccessExpression : FirExpression(), FirQualifiedAcces
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val typeRef: FirTypeRef
|
abstract override val typeRef: FirTypeRef
|
||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val safe: Boolean
|
|
||||||
abstract override val typeArguments: List<FirTypeProjection>
|
abstract override val typeArguments: List<FirTypeProjection>
|
||||||
abstract override val explicitReceiver: FirExpression?
|
abstract override val explicitReceiver: FirExpression?
|
||||||
abstract override val dispatchReceiver: FirExpression
|
abstract override val dispatchReceiver: FirExpression
|
||||||
|
|||||||
-1
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
interface FirQualifiedAccessWithoutCallee : FirStatement {
|
interface FirQualifiedAccessWithoutCallee : FirStatement {
|
||||||
override val source: FirSourceElement?
|
override val source: FirSourceElement?
|
||||||
override val annotations: List<FirAnnotationCall>
|
override val annotations: List<FirAnnotationCall>
|
||||||
val safe: Boolean
|
|
||||||
val typeArguments: List<FirTypeProjection>
|
val typeArguments: List<FirTypeProjection>
|
||||||
val explicitReceiver: FirExpression?
|
val explicitReceiver: FirExpression?
|
||||||
val dispatchReceiver: FirExpression
|
val dispatchReceiver: FirExpression
|
||||||
|
|||||||
-1
@@ -21,7 +21,6 @@ abstract class FirThisReceiverExpression : FirQualifiedAccessExpression() {
|
|||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val typeRef: FirTypeRef
|
abstract override val typeRef: FirTypeRef
|
||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val safe: Boolean
|
|
||||||
abstract override val typeArguments: List<FirTypeProjection>
|
abstract override val typeArguments: List<FirTypeProjection>
|
||||||
abstract override val explicitReceiver: FirExpression?
|
abstract override val explicitReceiver: FirExpression?
|
||||||
abstract override val dispatchReceiver: FirExpression
|
abstract override val dispatchReceiver: FirExpression
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
abstract class FirVariableAssignment : FirPureAbstractElement(), FirQualifiedAccess {
|
abstract class FirVariableAssignment : FirPureAbstractElement(), FirQualifiedAccess {
|
||||||
abstract override val source: FirSourceElement?
|
abstract override val source: FirSourceElement?
|
||||||
abstract override val annotations: List<FirAnnotationCall>
|
abstract override val annotations: List<FirAnnotationCall>
|
||||||
abstract override val safe: Boolean
|
|
||||||
abstract override val typeArguments: List<FirTypeProjection>
|
abstract override val typeArguments: List<FirTypeProjection>
|
||||||
abstract override val explicitReceiver: FirExpression?
|
abstract override val explicitReceiver: FirExpression?
|
||||||
abstract override val dispatchReceiver: FirExpression
|
abstract override val dispatchReceiver: FirExpression
|
||||||
|
|||||||
-2
@@ -38,7 +38,6 @@ open class FirFunctionCallBuilder : FirQualifiedAccessBuilder, FirCallBuilder, F
|
|||||||
override var source: FirSourceElement? = null
|
override var source: FirSourceElement? = null
|
||||||
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
override var safe: Boolean = false
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
|
override val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
|
||||||
override var explicitReceiver: FirExpression? = null
|
override var explicitReceiver: FirExpression? = null
|
||||||
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
||||||
@@ -52,7 +51,6 @@ open class FirFunctionCallBuilder : FirQualifiedAccessBuilder, FirCallBuilder, F
|
|||||||
source,
|
source,
|
||||||
typeRef,
|
typeRef,
|
||||||
annotations,
|
annotations,
|
||||||
safe,
|
|
||||||
typeArguments,
|
typeArguments,
|
||||||
explicitReceiver,
|
explicitReceiver,
|
||||||
dispatchReceiver,
|
dispatchReceiver,
|
||||||
|
|||||||
-1
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
interface FirQualifiedAccessBuilder {
|
interface FirQualifiedAccessBuilder {
|
||||||
abstract var source: FirSourceElement?
|
abstract var source: FirSourceElement?
|
||||||
abstract val annotations: MutableList<FirAnnotationCall>
|
abstract val annotations: MutableList<FirAnnotationCall>
|
||||||
abstract var safe: Boolean
|
|
||||||
abstract val typeArguments: MutableList<FirTypeProjection>
|
abstract val typeArguments: MutableList<FirTypeProjection>
|
||||||
abstract var explicitReceiver: FirExpression?
|
abstract var explicitReceiver: FirExpression?
|
||||||
abstract var dispatchReceiver: FirExpression
|
abstract var dispatchReceiver: FirExpression
|
||||||
|
|||||||
-2
@@ -33,7 +33,6 @@ class FirQualifiedAccessExpressionBuilder : FirQualifiedAccessBuilder, FirAnnota
|
|||||||
override var source: FirSourceElement? = null
|
override var source: FirSourceElement? = null
|
||||||
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
override var safe: Boolean = false
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
|
override val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
|
||||||
override var explicitReceiver: FirExpression? = null
|
override var explicitReceiver: FirExpression? = null
|
||||||
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
||||||
@@ -45,7 +44,6 @@ class FirQualifiedAccessExpressionBuilder : FirQualifiedAccessBuilder, FirAnnota
|
|||||||
source,
|
source,
|
||||||
typeRef,
|
typeRef,
|
||||||
annotations,
|
annotations,
|
||||||
safe,
|
|
||||||
typeArguments,
|
typeArguments,
|
||||||
explicitReceiver,
|
explicitReceiver,
|
||||||
dispatchReceiver,
|
dispatchReceiver,
|
||||||
|
|||||||
-7
@@ -48,13 +48,6 @@ class FirThisReceiverExpressionBuilder : FirQualifiedAccessBuilder, FirAnnotatio
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Deprecated("Modification of 'safe' has no impact for FirThisReceiverExpressionBuilder", level = DeprecationLevel.HIDDEN)
|
|
||||||
override var safe: Boolean
|
|
||||||
get() = throw IllegalStateException()
|
|
||||||
set(value) {
|
|
||||||
throw IllegalStateException()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated("Modification of 'explicitReceiver' has no impact for FirThisReceiverExpressionBuilder", level = DeprecationLevel.HIDDEN)
|
@Deprecated("Modification of 'explicitReceiver' has no impact for FirThisReceiverExpressionBuilder", level = DeprecationLevel.HIDDEN)
|
||||||
override var explicitReceiver: FirExpression?
|
override var explicitReceiver: FirExpression?
|
||||||
get() = throw IllegalStateException()
|
get() = throw IllegalStateException()
|
||||||
|
|||||||
-2
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
class FirVariableAssignmentBuilder : FirQualifiedAccessBuilder, FirAnnotationContainerBuilder {
|
class FirVariableAssignmentBuilder : FirQualifiedAccessBuilder, FirAnnotationContainerBuilder {
|
||||||
override var source: FirSourceElement? = null
|
override var source: FirSourceElement? = null
|
||||||
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
override val annotations: MutableList<FirAnnotationCall> = mutableListOf()
|
||||||
override var safe: Boolean by kotlin.properties.Delegates.notNull<Boolean>()
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
|
override val typeArguments: MutableList<FirTypeProjection> = mutableListOf()
|
||||||
override var explicitReceiver: FirExpression? = null
|
override var explicitReceiver: FirExpression? = null
|
||||||
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
||||||
@@ -41,7 +40,6 @@ class FirVariableAssignmentBuilder : FirQualifiedAccessBuilder, FirAnnotationCon
|
|||||||
return FirVariableAssignmentImpl(
|
return FirVariableAssignmentImpl(
|
||||||
source,
|
source,
|
||||||
annotations,
|
annotations,
|
||||||
safe,
|
|
||||||
typeArguments,
|
typeArguments,
|
||||||
explicitReceiver,
|
explicitReceiver,
|
||||||
dispatchReceiver,
|
dispatchReceiver,
|
||||||
|
|||||||
-1
@@ -37,7 +37,6 @@ internal class FirComponentCallImpl(
|
|||||||
override val componentIndex: Int,
|
override val componentIndex: Int,
|
||||||
) : FirComponentCall() {
|
) : FirComponentCall() {
|
||||||
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
override var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null)
|
||||||
override val safe: Boolean get() = false
|
|
||||||
override var calleeReference: FirNamedReference = FirSimpleNamedReference(source, Name.identifier("component$componentIndex"), null)
|
override var calleeReference: FirNamedReference = FirSimpleNamedReference(source, Name.identifier("component$componentIndex"), null)
|
||||||
|
|
||||||
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ open class FirFunctionCallImpl @FirImplementationDetail constructor(
|
|||||||
override val source: FirSourceElement?,
|
override val source: FirSourceElement?,
|
||||||
override var typeRef: FirTypeRef,
|
override var typeRef: FirTypeRef,
|
||||||
override val annotations: MutableList<FirAnnotationCall>,
|
override val annotations: MutableList<FirAnnotationCall>,
|
||||||
override var safe: Boolean,
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection>,
|
override val typeArguments: MutableList<FirTypeProjection>,
|
||||||
override var explicitReceiver: FirExpression?,
|
override var explicitReceiver: FirExpression?,
|
||||||
override var dispatchReceiver: FirExpression,
|
override var dispatchReceiver: FirExpression,
|
||||||
|
|||||||
-1
@@ -21,7 +21,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
interface FirModifiableQualifiedAccess : FirQualifiedAccessWithoutCallee {
|
interface FirModifiableQualifiedAccess : FirQualifiedAccessWithoutCallee {
|
||||||
override val source: FirSourceElement?
|
override val source: FirSourceElement?
|
||||||
override val annotations: MutableList<FirAnnotationCall>
|
override val annotations: MutableList<FirAnnotationCall>
|
||||||
override var safe: Boolean
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection>
|
override val typeArguments: MutableList<FirTypeProjection>
|
||||||
override var explicitReceiver: FirExpression?
|
override var explicitReceiver: FirExpression?
|
||||||
override var dispatchReceiver: FirExpression
|
override var dispatchReceiver: FirExpression
|
||||||
|
|||||||
-1
@@ -24,7 +24,6 @@ internal class FirQualifiedAccessExpressionImpl(
|
|||||||
override val source: FirSourceElement?,
|
override val source: FirSourceElement?,
|
||||||
override var typeRef: FirTypeRef,
|
override var typeRef: FirTypeRef,
|
||||||
override val annotations: MutableList<FirAnnotationCall>,
|
override val annotations: MutableList<FirAnnotationCall>,
|
||||||
override var safe: Boolean,
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection>,
|
override val typeArguments: MutableList<FirTypeProjection>,
|
||||||
override var explicitReceiver: FirExpression?,
|
override var explicitReceiver: FirExpression?,
|
||||||
override var dispatchReceiver: FirExpression,
|
override var dispatchReceiver: FirExpression,
|
||||||
|
|||||||
-1
@@ -29,7 +29,6 @@ internal class FirThisReceiverExpressionImpl(
|
|||||||
override val typeArguments: MutableList<FirTypeProjection>,
|
override val typeArguments: MutableList<FirTypeProjection>,
|
||||||
override var calleeReference: FirThisReference,
|
override var calleeReference: FirThisReference,
|
||||||
) : FirThisReceiverExpression(), FirModifiableQualifiedAccess {
|
) : FirThisReceiverExpression(), FirModifiableQualifiedAccess {
|
||||||
override var safe: Boolean = false
|
|
||||||
override var explicitReceiver: FirExpression? = null
|
override var explicitReceiver: FirExpression? = null
|
||||||
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
override var dispatchReceiver: FirExpression = FirNoReceiverExpression
|
||||||
override var extensionReceiver: FirExpression = FirNoReceiverExpression
|
override var extensionReceiver: FirExpression = FirNoReceiverExpression
|
||||||
|
|||||||
-1
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.fir.visitors.*
|
|||||||
internal class FirVariableAssignmentImpl(
|
internal class FirVariableAssignmentImpl(
|
||||||
override val source: FirSourceElement?,
|
override val source: FirSourceElement?,
|
||||||
override val annotations: MutableList<FirAnnotationCall>,
|
override val annotations: MutableList<FirAnnotationCall>,
|
||||||
override var safe: Boolean,
|
|
||||||
override val typeArguments: MutableList<FirTypeProjection>,
|
override val typeArguments: MutableList<FirTypeProjection>,
|
||||||
override var explicitReceiver: FirExpression?,
|
override var explicitReceiver: FirExpression?,
|
||||||
override var dispatchReceiver: FirExpression,
|
override var dispatchReceiver: FirExpression,
|
||||||
|
|||||||
-2
@@ -150,7 +150,6 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
|||||||
builder(functionCall) {
|
builder(functionCall) {
|
||||||
parents += qualifiedAccessBuilder
|
parents += qualifiedAccessBuilder
|
||||||
parents += callBuilder
|
parents += callBuilder
|
||||||
defaultFalse("safe")
|
|
||||||
defaultNoReceivers()
|
defaultNoReceivers()
|
||||||
openBuilder()
|
openBuilder()
|
||||||
default("argumentList") {
|
default("argumentList") {
|
||||||
@@ -161,7 +160,6 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
|||||||
|
|
||||||
builder(qualifiedAccessExpression) {
|
builder(qualifiedAccessExpression) {
|
||||||
parents += qualifiedAccessBuilder
|
parents += qualifiedAccessBuilder
|
||||||
defaultFalse("safe")
|
|
||||||
defaultNoReceivers()
|
defaultNoReceivers()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-11
@@ -76,19 +76,13 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
|||||||
|
|
||||||
impl(arrayOfCall)
|
impl(arrayOfCall)
|
||||||
|
|
||||||
val modifiableQualifiedAccess = impl(qualifiedAccessWithoutCallee, "FirModifiableQualifiedAccess") {
|
val modifiableQualifiedAccess = impl(qualifiedAccessWithoutCallee, "FirModifiableQualifiedAccess") {}
|
||||||
isMutable("safe")
|
|
||||||
}
|
|
||||||
|
|
||||||
impl(callableReferenceAccess) {
|
impl(callableReferenceAccess) {
|
||||||
parents += modifiableQualifiedAccess
|
parents += modifiableQualifiedAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
impl(componentCall) {
|
impl(componentCall) {
|
||||||
default("safe") {
|
|
||||||
value = "false"
|
|
||||||
withGetter = true
|
|
||||||
}
|
|
||||||
default("calleeReference", "FirSimpleNamedReference(source, Name.identifier(\"component\$componentIndex\"), null)")
|
default("calleeReference", "FirSimpleNamedReference(source, Name.identifier(\"component\$componentIndex\"), null)")
|
||||||
useTypes(simpleNamedReferenceType, nameType)
|
useTypes(simpleNamedReferenceType, nameType)
|
||||||
optInToInternals()
|
optInToInternals()
|
||||||
@@ -255,10 +249,6 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
|||||||
|
|
||||||
impl(thisReceiverExpression) {
|
impl(thisReceiverExpression) {
|
||||||
parents += modifiableQualifiedAccess
|
parents += modifiableQualifiedAccess
|
||||||
default("safe") {
|
|
||||||
value = "false"
|
|
||||||
withGetter = true
|
|
||||||
}
|
|
||||||
defaultNoReceivers()
|
defaultNoReceivers()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -185,7 +185,6 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
qualifiedAccessWithoutCallee.configure {
|
qualifiedAccessWithoutCallee.configure {
|
||||||
+booleanField("safe")
|
|
||||||
+typeArguments.withTransform()
|
+typeArguments.withTransform()
|
||||||
+receivers
|
+receivers
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user