LL API: fix kt -> fir mapping for KtObjectLiteralExpression
This commit is contained in:
committed by
teamcityserver
parent
32baac52e6
commit
9d53ad4346
+1
@@ -48,6 +48,7 @@ internal class FirElementBuilder {
|
||||
// null will be return in case of invalid KtValueArgument
|
||||
deparenthesized.getArgumentExpression()
|
||||
}
|
||||
deparenthesized is KtObjectLiteralExpression -> deparenthesized.objectDeclaration
|
||||
else -> deparenthesized
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// LOOK_UP_FOR_ELEMENT_OF_TYPE: org.jetbrains.kotlin.psi.KtObjectLiteralExpression
|
||||
|
||||
val x = <expr>object : Any {}</expr>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
KT element: KtObjectLiteralExpression
|
||||
FIR element: FirAnonymousObjectExpressionImpl
|
||||
|
||||
FIR element rendered:
|
||||
object : R|kotlin/Any| {
|
||||
private constructor(): R|<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -108,6 +108,17 @@ public class GetOrBuildFirTestGenerated extends AbstractGetOrBuildFirTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/expressions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Expressions {
|
||||
@Test
|
||||
@TestMetadata("objectLiteralExpression.kt")
|
||||
public void testObjectLiteralExpression() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/expressions/objectLiteralExpression.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/inImport")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user