[FIR] Remove FirOperatorCall node from fir tree
This commit is contained in:
+1
-8
@@ -378,14 +378,7 @@ class ExpressionsConverter(
|
||||
explicitReceiver = getAsFirExpression(argument, "No operand")
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
val firOperation = operationToken.toFirOperation()
|
||||
buildOperatorCall {
|
||||
source = unaryExpression.toFirSourceElement()
|
||||
operation = firOperation
|
||||
argumentList = buildUnaryArgumentList(getAsFirExpression<FirExpression>(argument, "No operand"))
|
||||
}
|
||||
}
|
||||
else -> throw IllegalStateException("Unexpected expression: ${unaryExpression.asText}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ data class WhenEntry(
|
||||
|
||||
fun toFirWhenConditionWithoutSubject(): FirExpression {
|
||||
return when (val condition = conditions.firstOrNull()) {
|
||||
// is FirOperatorCall -> condition.arguments.first()
|
||||
null -> buildErrorExpression(null, ConeSimpleDiagnostic("No expression in condition with expression", DiagnosticKind.Syntax))
|
||||
else -> condition
|
||||
}
|
||||
|
||||
@@ -1687,13 +1687,7 @@ class RawFirBuilder(
|
||||
explicitReceiver = argument.toFirExpression("No operand")
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
buildOperatorCall {
|
||||
source = expression.toFirSourceElement()
|
||||
operation = operationToken.toFirOperation()
|
||||
argumentList = buildUnaryArgumentList(argument.toFirExpression("No operand"))
|
||||
}
|
||||
}
|
||||
else -> throw IllegalStateException("Unexpected expression: ${expression.text}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user