[FIR JS] Support smart casts for dynamic
This commit is contained in:
+3
-3
@@ -121,9 +121,9 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
val callableReferenceAccess by element(Expression, qualifiedAccessExpression)
|
||||
val thisReceiverExpression by element(Expression, qualifiedAccessExpression)
|
||||
val wrappedExpressionWithSmartcast by element(Expression)
|
||||
val wrappedExpressionWithSmartcastToNull by element(Expression, wrappedExpressionWithSmartcast)
|
||||
val wrappedExpressionWithSmartcastToNothing by element(Expression, wrappedExpressionWithSmartcast)
|
||||
val expressionWithSmartcast by element(Expression, qualifiedAccessExpression, wrappedExpressionWithSmartcast)
|
||||
val expressionWithSmartcastToNull by element(Expression, expressionWithSmartcast, wrappedExpressionWithSmartcastToNull)
|
||||
val expressionWithSmartcastToNothing by element(Expression, expressionWithSmartcast, wrappedExpressionWithSmartcastToNothing)
|
||||
val safeCallExpression by element(Expression, expression)
|
||||
val checkedSafeCallSubject by element(Expression, expression)
|
||||
val getClassCall by element(Expression, expression, call)
|
||||
@@ -143,7 +143,7 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
val variableAssignment by element(Expression, qualifiedAccess)
|
||||
val whenSubjectExpression by element(Expression, expression)
|
||||
val whenSubjectExpressionWithSmartcast by element(Expression, whenSubjectExpression, wrappedExpressionWithSmartcast)
|
||||
val whenSubjectExpressionWithSmartcastToNull by element(Expression, whenSubjectExpression, wrappedExpressionWithSmartcastToNull)
|
||||
val whenSubjectExpressionWithSmartcastToNothing by element(Expression, whenSubjectExpression, wrappedExpressionWithSmartcastToNothing)
|
||||
|
||||
val wrappedDelegateExpression by element(Expression, wrappedExpression)
|
||||
|
||||
|
||||
+2
-2
@@ -190,10 +190,10 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
}
|
||||
|
||||
noImpl(expressionWithSmartcast)
|
||||
noImpl(expressionWithSmartcastToNull)
|
||||
noImpl(expressionWithSmartcastToNothing)
|
||||
|
||||
noImpl(whenSubjectExpressionWithSmartcast)
|
||||
noImpl(whenSubjectExpressionWithSmartcastToNull)
|
||||
noImpl(whenSubjectExpressionWithSmartcastToNothing)
|
||||
|
||||
impl(getClassCall) {
|
||||
default("argument") {
|
||||
|
||||
+5
-5
@@ -501,7 +501,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
+smartcastStability
|
||||
}
|
||||
|
||||
wrappedExpressionWithSmartcastToNull.configure {
|
||||
wrappedExpressionWithSmartcastToNothing.configure {
|
||||
withArg("E", expression)
|
||||
parentArg(wrappedExpressionWithSmartcast, "E", "E")
|
||||
+field("smartcastTypeWithoutNullableNothing", typeRef)
|
||||
@@ -511,8 +511,8 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
parentArg(wrappedExpressionWithSmartcast, "E", qualifiedAccessExpression)
|
||||
}
|
||||
|
||||
expressionWithSmartcastToNull.configure {
|
||||
parentArg(wrappedExpressionWithSmartcastToNull, "E", qualifiedAccessExpression)
|
||||
expressionWithSmartcastToNothing.configure {
|
||||
parentArg(wrappedExpressionWithSmartcastToNothing, "E", qualifiedAccessExpression)
|
||||
}
|
||||
|
||||
safeCallExpression.configure {
|
||||
@@ -585,8 +585,8 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
parentArg(wrappedExpressionWithSmartcast, "E", whenSubjectExpression)
|
||||
}
|
||||
|
||||
whenSubjectExpressionWithSmartcastToNull.configure {
|
||||
parentArg(wrappedExpressionWithSmartcastToNull, "E", whenSubjectExpression)
|
||||
whenSubjectExpressionWithSmartcastToNothing.configure {
|
||||
parentArg(wrappedExpressionWithSmartcastToNothing, "E", whenSubjectExpression)
|
||||
}
|
||||
|
||||
wrappedExpression.configure {
|
||||
|
||||
Reference in New Issue
Block a user