Test order of enum entries in deserialized classes
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
enum class E {
|
||||
ONE
|
||||
TWO
|
||||
THREE
|
||||
FOUR
|
||||
FIVE
|
||||
SIX
|
||||
SEVEN
|
||||
EIGHT
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package test
|
||||
|
||||
internal final enum class E : kotlin.Enum<test.E> {
|
||||
public enum entry ONE : test.E {
|
||||
/*primary*/ private constructor ONE()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-ONE> : test.E.ONE {
|
||||
/*primary*/ private constructor <class-object-for-ONE>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry TWO : test.E {
|
||||
/*primary*/ private constructor TWO()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-TWO> : test.E.TWO {
|
||||
/*primary*/ private constructor <class-object-for-TWO>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry THREE : test.E {
|
||||
/*primary*/ private constructor THREE()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-THREE> : test.E.THREE {
|
||||
/*primary*/ private constructor <class-object-for-THREE>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry FOUR : test.E {
|
||||
/*primary*/ private constructor FOUR()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-FOUR> : test.E.FOUR {
|
||||
/*primary*/ private constructor <class-object-for-FOUR>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry FIVE : test.E {
|
||||
/*primary*/ private constructor FIVE()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-FIVE> : test.E.FIVE {
|
||||
/*primary*/ private constructor <class-object-for-FIVE>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry SIX : test.E {
|
||||
/*primary*/ private constructor SIX()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-SIX> : test.E.SIX {
|
||||
/*primary*/ private constructor <class-object-for-SIX>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry SEVEN : test.E {
|
||||
/*primary*/ private constructor SEVEN()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-SEVEN> : test.E.SEVEN {
|
||||
/*primary*/ private constructor <class-object-for-SEVEN>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
public enum entry EIGHT : test.E {
|
||||
/*primary*/ private constructor EIGHT()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public class object <class-object-for-EIGHT> : test.E.EIGHT {
|
||||
/*primary*/ private constructor <class-object-for-EIGHT>()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
}
|
||||
|
||||
/*primary*/ private constructor E()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.E>
|
||||
}
|
||||
@@ -4133,6 +4133,12 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntries.kt")
|
||||
public void testEnumEntries() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt");
|
||||
doTestCompiledKotlin(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt");
|
||||
|
||||
+6
@@ -2365,6 +2365,12 @@ public class LazyResolveRecursiveComparingTestGenerated extends AbstractLazyReso
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntries.kt")
|
||||
public void testEnumEntries() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt");
|
||||
|
||||
+1
@@ -182,6 +182,7 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
|
||||
return computeFunctions(name);
|
||||
}
|
||||
});
|
||||
|
||||
this.properties = storageManager.createMemoizedFunction(new Function1<Name, Collection<PropertyDescriptor>>() {
|
||||
@Override
|
||||
public Collection<PropertyDescriptor> invoke(Name name) {
|
||||
|
||||
@@ -2362,6 +2362,12 @@ public class LazyResolveByStubTestGenerated extends AbstractLazyResolveByStubTes
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("enumEntries.kt")
|
||||
public void testEnumEntries() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerClasses.kt")
|
||||
public void testInnerClasses() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt");
|
||||
|
||||
Reference in New Issue
Block a user