FIR LT: support labelled destructured declarations

add missing conversion in the LT to FIR converter
#KT-56759 fixed
This commit is contained in:
Ilya Chernikov
2023-03-07 16:05:47 +01:00
committed by Space Team
parent 7f0a4ad737
commit b3d0a0a1c8
3 changed files with 3 additions and 3 deletions
@@ -1331,7 +1331,7 @@ class DeclarationsConverter(
/**
* @see org.jetbrains.kotlin.fir.builder.RawFirBuilder.Visitor.visitDestructuringDeclaration
*/
private fun convertDestructingDeclaration(destructingDeclaration: LighterASTNode): DestructuringDeclaration {
internal fun convertDestructingDeclaration(destructingDeclaration: LighterASTNode): DestructuringDeclaration {
var modifiers = Modifier()
var isVar = false
val entries = mutableListOf<FirVariable?>()
@@ -126,6 +126,7 @@ class ExpressionsConverter(
OBJECT_LITERAL -> declarationsConverter.convertObjectLiteral(expression)
FUN -> declarationsConverter.convertFunctionDeclaration(expression)
DESTRUCTURING_DECLARATION -> declarationsConverter.convertDestructingDeclaration(expression).toFirDestructingDeclaration(baseModuleData)
else -> buildErrorExpression(null, ConeSimpleDiagnostic(errorReason, DiagnosticKind.ExpressionExpected))
}
}
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
// Reason: KT-56759
data class A(val a: Int, val b: Int)
fun box() : String