Sealed classes now are decompiled correctly + test #EA-70762 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-07-15 16:14:01 +03:00
parent 8b325e8a30
commit c19785252c
4 changed files with 47 additions and 1 deletions
@@ -116,7 +116,8 @@ enum class FlagsToModifiers {
ProtoBuf.Modality.ABSTRACT -> JetTokens.ABSTRACT_KEYWORD
ProtoBuf.Modality.FINAL -> JetTokens.FINAL_KEYWORD
ProtoBuf.Modality.OPEN -> JetTokens.OPEN_KEYWORD
else -> throw IllegalStateException("Unexpected modality: $modality")
ProtoBuf.Modality.SEALED -> JetTokens.SEALED_KEYWORD
null -> throw IllegalStateException("Unexpected modality: null")
}
}
},
+6
View File
@@ -0,0 +1,6 @@
package test
sealed class Sealed {
class Nested: Sealed()
object Top: Sealed()
}
+33
View File
@@ -0,0 +1,33 @@
PsiJetFileStubImpl[package=test]
PACKAGE_DIRECTIVE:
REFERENCE_EXPRESSION:[referencedName=test]
IMPORT_LIST:
CLASS:[fqName=test.Sealed, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=Sealed, superNames=[]]
MODIFIER_LIST:[internal sealed]
PRIMARY_CONSTRUCTOR:
MODIFIER_LIST:[private]
VALUE_PARAMETER_LIST:
CLASS_BODY:
CLASS:[fqName=test.Sealed.Nested, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=false, name=Nested, superNames=[Sealed]]
MODIFIER_LIST:[internal final]
PRIMARY_CONSTRUCTOR:
MODIFIER_LIST:[public]
VALUE_PARAMETER_LIST:
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CLASS:
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=test]
REFERENCE_EXPRESSION:[referencedName=Sealed]
CLASS_BODY:
OBJECT_DECLARATION:[fqName=test.Sealed.Top, isCompanion=false, isLocal=false, isObjectLiteral=false, isTopLevel=false, name=Top, superNames=[Sealed]]
MODIFIER_LIST:[internal]
DELEGATION_SPECIFIER_LIST:
DELEGATOR_SUPER_CLASS:
TYPE_REFERENCE:
USER_TYPE:[isAbsoluteInRootPackage=false]
USER_TYPE:[isAbsoluteInRootPackage=false]
REFERENCE_EXPRESSION:[referencedName=test]
REFERENCE_EXPRESSION:[referencedName=Sealed]
CLASS_BODY:
@@ -125,6 +125,12 @@ public class ClsStubBuilderTestGenerated extends AbstractClsStubBuilderTest {
doTest(fileName);
}
@TestMetadata("Sealed")
public void testSealed() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Sealed/");
doTest(fileName);
}
@TestMetadata("SecondaryConstructors")
public void testSecondaryConstructors() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/SecondaryConstructors/");