JetInitializerList#getInitializers() by stub
This commit is contained in:
@@ -23,6 +23,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
||||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class JetInitializerList extends JetElementImplStub<PsiJetPlaceHolderStub<JetInitializerList>> {
|
public class JetInitializerList extends JetElementImplStub<PsiJetPlaceHolderStub<JetInitializerList>> {
|
||||||
@@ -41,6 +42,6 @@ public class JetInitializerList extends JetElementImplStub<PsiJetPlaceHolderStub
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<JetDelegationSpecifier> getInitializers() {
|
public List<JetDelegationSpecifier> getInitializers() {
|
||||||
return PsiTreeUtil.getChildrenOfTypeAsList(this, JetDelegationSpecifier.class);
|
return Arrays.asList(getStubOrPsiChildren(JetStubElementTypes.DELEGATION_SPECIFIER_TYPES, JetDelegationSpecifier.ARRAY_FACTORY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
enum class En(val b: Boolean = true, val i: Int = 0) {
|
||||||
|
E1: En()
|
||||||
|
E2: En(true, 1)
|
||||||
|
E3: En(i = 2)
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
internal final enum class En : kotlin.Enum<test.En> {
|
||||||
|
/*primary*/ private constructor En(/*0*/ b: kotlin.Boolean = ..., /*1*/ i: kotlin.Int = ...)
|
||||||
|
internal final val b: kotlin.Boolean
|
||||||
|
internal final fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final val i: kotlin.Int
|
||||||
|
internal final fun <get-i>(): 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-En> {
|
||||||
|
/*primary*/ private constructor <class-object-for-En>()
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.En
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<test.En>
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum entry E1 : test.En {
|
||||||
|
/*primary*/ private constructor E1()
|
||||||
|
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ val i: kotlin.Int
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-i>(): 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-E1> : test.En.E1 {
|
||||||
|
/*primary*/ private constructor <class-object-for-E1>()
|
||||||
|
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ val i: kotlin.Int
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-i>(): 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 E2 : test.En {
|
||||||
|
/*primary*/ private constructor E2()
|
||||||
|
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ val i: kotlin.Int
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-i>(): 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-E2> : test.En.E2 {
|
||||||
|
/*primary*/ private constructor <class-object-for-E2>()
|
||||||
|
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ val i: kotlin.Int
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-i>(): 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 E3 : test.En {
|
||||||
|
/*primary*/ private constructor E3()
|
||||||
|
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ val i: kotlin.Int
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-i>(): 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-E3> : test.En.E3 {
|
||||||
|
/*primary*/ private constructor <class-object-for-E3>()
|
||||||
|
internal final override /*1*/ /*fake_override*/ val b: kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-b>(): kotlin.Boolean
|
||||||
|
internal final override /*1*/ /*fake_override*/ val i: kotlin.Int
|
||||||
|
internal final override /*1*/ /*fake_override*/ fun <get-i>(): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2266,6 +2266,11 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
|||||||
doTestCompiledKotlin("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt");
|
doTestCompiledKotlin("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumWithConstuctor.kt")
|
||||||
|
public void testEnumWithConstuctor() throws Exception {
|
||||||
|
doTestCompiledKotlin("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("innerEnum.kt")
|
@TestMetadata("innerEnum.kt")
|
||||||
public void testInnerEnum() throws Exception {
|
public void testInnerEnum() throws Exception {
|
||||||
doTestCompiledKotlin("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt");
|
doTestCompiledKotlin("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt");
|
||||||
|
|||||||
+5
@@ -744,6 +744,11 @@ public class LazyResolveRecursiveComparingTestGenerated extends AbstractLazyReso
|
|||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumWithConstuctor.kt")
|
||||||
|
public void testEnumWithConstuctor() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("innerEnum.kt")
|
@TestMetadata("innerEnum.kt")
|
||||||
public void testInnerEnum() throws Exception {
|
public void testInnerEnum() throws Exception {
|
||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt");
|
||||||
|
|||||||
@@ -744,6 +744,11 @@ public class LazyResolveByStubTestGenerated extends AbstractLazyResolveByStubTes
|
|||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("enumWithConstuctor.kt")
|
||||||
|
public void testEnumWithConstuctor() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("innerEnum.kt")
|
@TestMetadata("innerEnum.kt")
|
||||||
public void testInnerEnum() throws Exception {
|
public void testInnerEnum() throws Exception {
|
||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user