[decompiler] ensure names starting with numbers are escaped

^ KTIJ-25985
This commit is contained in:
Anna Kozlova
2023-06-22 19:05:49 +02:00
committed by teamcity
parent 60f09f6512
commit 137f8b7c70
5 changed files with 32 additions and 1 deletions
@@ -0,0 +1,3 @@
object SpecialNames {
val `1M` = 1
}
@@ -0,0 +1,13 @@
PsiJetFileStubImpl[package=]
PACKAGE_DIRECTIVE
IMPORT_LIST
OBJECT_DECLARATION[classId=/SpecialNames, fqName=SpecialNames, isCompanion=false, isLocal=false, isObjectLiteral=false, isTopLevel=true, name=SpecialNames, superNames=[]]
MODIFIER_LIST[public]
CLASS_BODY
PROPERTY[fqName=SpecialNames.1M, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=false, isVar=false, name=1M]
MODIFIER_LIST[public final]
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION[referencedName=kotlin]
REFERENCE_EXPRESSION[referencedName=Int]
@@ -246,6 +246,12 @@ public class ClsStubBuilderTestGenerated extends AbstractClsStubBuilderTest {
runTest("analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/SecondaryConstructors/");
}
@Test
@TestMetadata("SpecialNames")
public void testSpecialNames() throws Exception {
runTest("analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/SpecialNames/");
}
@Test
@TestMetadata("SuspendLambda")
public void testSuspendLambda() throws Exception {
@@ -246,6 +246,12 @@ public class ByDecompiledPsiStubBuilderTestGenerated extends AbstractByDecompile
runTest("analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/SecondaryConstructors/");
}
@Test
@TestMetadata("SpecialNames")
public void testSpecialNames() throws Exception {
runTest("analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/SpecialNames/");
}
@Test
@TestMetadata("SuspendLambda")
public void testSuspendLambda() throws Exception {