LL API: fix kt -> fir mapping of type inside nullable type
This commit is contained in:
committed by
teamcityserver
parent
ddd257adc2
commit
1423aa2c43
+1
@@ -50,6 +50,7 @@ internal class FirElementBuilder {
|
|||||||
}
|
}
|
||||||
deparenthesized is KtObjectLiteralExpression -> deparenthesized.objectDeclaration
|
deparenthesized is KtObjectLiteralExpression -> deparenthesized.objectDeclaration
|
||||||
deparenthesized is KtStringTemplateEntryWithExpression -> deparenthesized.expression
|
deparenthesized is KtStringTemplateEntryWithExpression -> deparenthesized.expression
|
||||||
|
deparenthesized is KtUserType && deparenthesized.parent is KtNullableType -> deparenthesized.parent as KtNullableType
|
||||||
else -> deparenthesized
|
else -> deparenthesized
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
fun x(): <expr>Int</expr>? = TODO()
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
KT element: KtUserType
|
||||||
|
FIR element: FirResolvedTypeRefImpl
|
||||||
|
|
||||||
|
FIR element rendered:
|
||||||
|
R|kotlin/Int?|
|
||||||
+6
@@ -475,6 +475,12 @@ public class GetOrBuildFirTestGenerated extends AbstractGetOrBuildFirTest {
|
|||||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/nestedTypeArgument.kt");
|
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/nestedTypeArgument.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nullableTypeWithooutQuestionMark.kt")
|
||||||
|
public void testNullableTypeWithooutQuestionMark() throws Exception {
|
||||||
|
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/nullableTypeWithooutQuestionMark.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("typeArgument.kt")
|
@TestMetadata("typeArgument.kt")
|
||||||
public void testTypeArgument() throws Exception {
|
public void testTypeArgument() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user