Introduce warning for secondary constructor in enums without delegation to primary constructors (KT-35870)
This commit is contained in:
+10
@@ -7612,6 +7612,16 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
|||||||
runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt");
|
runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secondaryConstructorWithoutDelegatingToPrimaryOne.kt")
|
||||||
|
public void testSecondaryConstructorWithoutDelegatingToPrimaryOne() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/enum/secondaryConstructorWithoutDelegatingToPrimaryOne.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature.kt")
|
||||||
|
public void testSecondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/enum/secondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("starImportNestedClassAndEntries.kt")
|
@TestMetadata("starImportNestedClassAndEntries.kt")
|
||||||
public void testStarImportNestedClassAndEntries() throws Exception {
|
public void testStarImportNestedClassAndEntries() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt");
|
runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt");
|
||||||
|
|||||||
@@ -388,6 +388,9 @@ public interface Errors {
|
|||||||
DiagnosticFactory0<KtConstructorDelegationCall> PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED =
|
DiagnosticFactory0<KtConstructorDelegationCall> PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED =
|
||||||
DiagnosticFactory0.create(ERROR, PositioningStrategies.SECONDARY_CONSTRUCTOR_DELEGATION_CALL);
|
DiagnosticFactory0.create(ERROR, PositioningStrategies.SECONDARY_CONSTRUCTOR_DELEGATION_CALL);
|
||||||
|
|
||||||
|
DiagnosticFactory0<KtConstructorDelegationCall> PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED_IN_ENUM =
|
||||||
|
DiagnosticFactory0.create(WARNING, PositioningStrategies.SECONDARY_CONSTRUCTOR_DELEGATION_CALL);
|
||||||
|
|
||||||
DiagnosticFactory0<KtConstructorDelegationReferenceExpression> DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR =
|
DiagnosticFactory0<KtConstructorDelegationReferenceExpression> DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR =
|
||||||
DiagnosticFactory0.create(ERROR);
|
DiagnosticFactory0.create(ERROR);
|
||||||
|
|
||||||
|
|||||||
+1
@@ -634,6 +634,7 @@ public class DefaultErrorMessages {
|
|||||||
MAP.put(CONSTRUCTOR_IN_OBJECT, "Constructors are not allowed for objects");
|
MAP.put(CONSTRUCTOR_IN_OBJECT, "Constructors are not allowed for objects");
|
||||||
MAP.put(SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR, "Supertype initialization is impossible without primary constructor");
|
MAP.put(SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR, "Supertype initialization is impossible without primary constructor");
|
||||||
MAP.put(PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED, "Primary constructor call expected");
|
MAP.put(PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED, "Primary constructor call expected");
|
||||||
|
MAP.put(PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED_IN_ENUM, "Primary constructor call expected. It's going to be an error in 1.5.");
|
||||||
MAP.put(DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR, "Call to super is not allowed in enum constructor");
|
MAP.put(DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR, "Call to super is not allowed in enum constructor");
|
||||||
MAP.put(PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS, "Primary constructor required for data class");
|
MAP.put(PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS, "Primary constructor required for data class");
|
||||||
MAP.put(EXPLICIT_DELEGATION_CALL_REQUIRED,
|
MAP.put(EXPLICIT_DELEGATION_CALL_REQUIRED,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.config.LanguageFeature;
|
|||||||
import org.jetbrains.kotlin.config.LanguageVersionSettings;
|
import org.jetbrains.kotlin.config.LanguageVersionSettings;
|
||||||
import org.jetbrains.kotlin.descriptors.*;
|
import org.jetbrains.kotlin.descriptors.*;
|
||||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
||||||
|
import org.jetbrains.kotlin.diagnostics.DiagnosticFactory0;
|
||||||
import org.jetbrains.kotlin.name.Name;
|
import org.jetbrains.kotlin.name.Name;
|
||||||
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus;
|
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus;
|
||||||
import org.jetbrains.kotlin.psi.*;
|
import org.jetbrains.kotlin.psi.*;
|
||||||
@@ -334,8 +335,12 @@ public class CallResolver {
|
|||||||
KtConstructorDelegationCall delegationCall = (KtConstructorDelegationCall) context.call.getCallElement();
|
KtConstructorDelegationCall delegationCall = (KtConstructorDelegationCall) context.call.getCallElement();
|
||||||
DeclarationDescriptor container = context.scope.getOwnerDescriptor();
|
DeclarationDescriptor container = context.scope.getOwnerDescriptor();
|
||||||
assert container instanceof ConstructorDescriptor : "Trying to resolve JetConstructorDelegationCall not in constructor. scope.ownerDescriptor = " + container;
|
assert container instanceof ConstructorDescriptor : "Trying to resolve JetConstructorDelegationCall not in constructor. scope.ownerDescriptor = " + container;
|
||||||
return (OverloadResolutionResults) resolveConstructorDelegationCall(context, delegationCall, (KtConstructorDelegationReferenceExpression) calleeExpression,
|
return (OverloadResolutionResults) resolveConstructorDelegationCall(
|
||||||
(ClassConstructorDescriptor) container);
|
context,
|
||||||
|
delegationCall,
|
||||||
|
(KtConstructorDelegationReferenceExpression) calleeExpression,
|
||||||
|
(ClassDescriptor) container.getContainingDeclaration()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else if (calleeExpression == null) {
|
else if (calleeExpression == null) {
|
||||||
return checkArgumentTypesAndFail(context);
|
return checkArgumentTypesAndFail(context);
|
||||||
@@ -433,18 +438,28 @@ public class CallResolver {
|
|||||||
dataFlowValueFactory,
|
dataFlowValueFactory,
|
||||||
InferenceSession.Companion.getDefault());
|
InferenceSession.Companion.getDefault());
|
||||||
|
|
||||||
if (call.getCalleeExpression() == null) return checkArgumentTypesAndFail(context);
|
KtConstructorDelegationReferenceExpression calleeExpression = call.getCalleeExpression();
|
||||||
|
|
||||||
|
if (calleeExpression == null) return checkArgumentTypesAndFail(context);
|
||||||
|
|
||||||
|
ClassDescriptor currentClassDescriptor = constructorDescriptor.getContainingDeclaration();
|
||||||
|
|
||||||
if (constructorDescriptor.getConstructedClass().getKind() == ClassKind.ENUM_CLASS && call.isImplicit()) {
|
if (constructorDescriptor.getConstructedClass().getKind() == ClassKind.ENUM_CLASS && call.isImplicit()) {
|
||||||
|
if (currentClassDescriptor.getUnsubstitutedPrimaryConstructor() != null) {
|
||||||
|
DiagnosticFactory0<KtConstructorDelegationCall> warningOrError;
|
||||||
|
|
||||||
|
if (languageVersionSettings.supportsFeature(LanguageFeature.RequiredPrimaryConstructorDelegationCallInEnums)) {
|
||||||
|
warningOrError = PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED; // error
|
||||||
|
} else {
|
||||||
|
warningOrError = PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED_IN_ENUM; // warning
|
||||||
|
}
|
||||||
|
|
||||||
|
context.trace.report(warningOrError.on((KtConstructorDelegationCall) calleeExpression.getParent()));
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return resolveConstructorDelegationCall(
|
return resolveConstructorDelegationCall(context, call, call.getCalleeExpression(), currentClassDescriptor);
|
||||||
context,
|
|
||||||
call,
|
|
||||||
call.getCalleeExpression(),
|
|
||||||
constructorDescriptor
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@@ -452,12 +467,10 @@ public class CallResolver {
|
|||||||
@NotNull BasicCallResolutionContext context,
|
@NotNull BasicCallResolutionContext context,
|
||||||
@NotNull KtConstructorDelegationCall call,
|
@NotNull KtConstructorDelegationCall call,
|
||||||
@NotNull KtConstructorDelegationReferenceExpression calleeExpression,
|
@NotNull KtConstructorDelegationReferenceExpression calleeExpression,
|
||||||
@NotNull ClassConstructorDescriptor calleeConstructor
|
@NotNull ClassDescriptor currentClassDescriptor
|
||||||
) {
|
) {
|
||||||
context.trace.record(BindingContext.LEXICAL_SCOPE, call, context.scope);
|
context.trace.record(BindingContext.LEXICAL_SCOPE, call, context.scope);
|
||||||
|
|
||||||
ClassDescriptor currentClassDescriptor = calleeConstructor.getContainingDeclaration();
|
|
||||||
|
|
||||||
boolean isThisCall = calleeExpression.isThis();
|
boolean isThisCall = calleeExpression.isThis();
|
||||||
if (currentClassDescriptor.getKind() == ClassKind.ENUM_CLASS && !isThisCall) {
|
if (currentClassDescriptor.getKind() == ClassKind.ENUM_CLASS && !isThisCall) {
|
||||||
context.trace.report(DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR.on(calleeExpression));
|
context.trace.report(DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR.on(calleeExpression));
|
||||||
@@ -484,9 +497,8 @@ public class CallResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
KotlinType superType = isThisCall ?
|
KotlinType superType =
|
||||||
calleeConstructor.getContainingDeclaration().getDefaultType() :
|
isThisCall ? currentClassDescriptor.getDefaultType() : DescriptorUtils.getSuperClassType(currentClassDescriptor);
|
||||||
DescriptorUtils.getSuperClassType(currentClassDescriptor);
|
|
||||||
|
|
||||||
Pair<Collection<ResolutionCandidate<ConstructorDescriptor>>, BasicCallResolutionContext> candidatesAndContext =
|
Pair<Collection<ResolutionCandidate<ConstructorDescriptor>>, BasicCallResolutionContext> candidatesAndContext =
|
||||||
prepareCandidatesAndContextForConstructorCall(superType, context, syntheticScopes);
|
prepareCandidatesAndContextForConstructorCall(superType, context, syntheticScopes);
|
||||||
|
|||||||
Vendored
+43
@@ -0,0 +1,43 @@
|
|||||||
|
// DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !LANGUAGE: -RequiredPrimaryConstructorDelegationCallInEnums
|
||||||
|
|
||||||
|
enum class Enum1(val a: String) {
|
||||||
|
A;
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum2(val a: String) {
|
||||||
|
A, B;
|
||||||
|
constructor(): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum3(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum4(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>()
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum5(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(a = "")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum6(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum7(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
constructor(x: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum8(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(x: Int)<!>
|
||||||
|
}
|
||||||
Vendored
+43
@@ -0,0 +1,43 @@
|
|||||||
|
// DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !LANGUAGE: -RequiredPrimaryConstructorDelegationCallInEnums
|
||||||
|
|
||||||
|
enum class Enum1(val a: String) {
|
||||||
|
A;
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED_IN_ENUM!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum2(val a: String) {
|
||||||
|
A, B;
|
||||||
|
constructor(): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum3(val a: String = "") {
|
||||||
|
<!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>A,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>B,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>C;<!>
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED_IN_ENUM!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum4(val a: String = "") {
|
||||||
|
<!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>A,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>B,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>C;<!>
|
||||||
|
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>()
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum5(val a: String = "") {
|
||||||
|
<!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>A,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>B,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>C;<!>
|
||||||
|
constructor(): this(a = "")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum6(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum7(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
constructor(x: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum8(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED_IN_ENUM!>constructor(x: Int)<!>
|
||||||
|
}
|
||||||
Vendored
+196
@@ -0,0 +1,196 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final enum class Enum1 : kotlin.Enum<Enum1> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
private constructor Enum1()
|
||||||
|
private constructor Enum1(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum1): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum1!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum1
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum1>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum2 : kotlin.Enum<Enum2> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
private constructor Enum2()
|
||||||
|
private constructor Enum2(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum2): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum2!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum2
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum2>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum3 : kotlin.Enum<Enum3> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum3()
|
||||||
|
private constructor Enum3(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum3): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum3!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum3
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum3>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum4 : kotlin.Enum<Enum4> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum4()
|
||||||
|
private constructor Enum4(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum4): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum4!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum4
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum4>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum5 : kotlin.Enum<Enum5> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum5()
|
||||||
|
private constructor Enum5(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum5): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum5!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum5
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum5>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum6 : kotlin.Enum<Enum6> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum6(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum6): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum6!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum6
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum6>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum7 : kotlin.Enum<Enum7> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum7()
|
||||||
|
private constructor Enum7(/*0*/ x: kotlin.Int)
|
||||||
|
private constructor Enum7(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum7): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum7!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum7
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum7>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum8 : kotlin.Enum<Enum8> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum8()
|
||||||
|
private constructor Enum8(/*0*/ x: kotlin.Int)
|
||||||
|
private constructor Enum8(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum8): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum8!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum8
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum8>
|
||||||
|
}
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
// DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !LANGUAGE: +RequiredPrimaryConstructorDelegationCallInEnums
|
||||||
|
|
||||||
|
enum class Enum1(val a: String) {
|
||||||
|
A;
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum2(val a: String) {
|
||||||
|
A, B;
|
||||||
|
constructor(): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum3(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum4(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>()
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum5(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(a = "")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum6(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum7(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
constructor(x: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum8(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(x: Int)<!>
|
||||||
|
}
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
// DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !LANGUAGE: +RequiredPrimaryConstructorDelegationCallInEnums
|
||||||
|
|
||||||
|
enum class Enum1(val a: String) {
|
||||||
|
A;
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum2(val a: String) {
|
||||||
|
A, B;
|
||||||
|
constructor(): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum3(val a: String = "") {
|
||||||
|
<!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>A,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>B,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>C;<!>
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum4(val a: String = "") {
|
||||||
|
<!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>A,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>B,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>C;<!>
|
||||||
|
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>()
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum5(val a: String = "") {
|
||||||
|
<!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>A,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>B,<!> <!ENUM_ENTRY_SHOULD_BE_INITIALIZED!>C;<!>
|
||||||
|
constructor(): this(a = "")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum6(val a: String = "") {
|
||||||
|
A, B, C;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum7(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
constructor(x: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Enum8(val a: String) {
|
||||||
|
A, B, C;
|
||||||
|
constructor(): this(10)
|
||||||
|
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(x: Int)<!>
|
||||||
|
}
|
||||||
+196
@@ -0,0 +1,196 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final enum class Enum1 : kotlin.Enum<Enum1> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
private constructor Enum1()
|
||||||
|
private constructor Enum1(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum1): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum1!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum1
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum1>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum2 : kotlin.Enum<Enum2> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
private constructor Enum2()
|
||||||
|
private constructor Enum2(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum2): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum2!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum2
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum2>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum3 : kotlin.Enum<Enum3> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum3()
|
||||||
|
private constructor Enum3(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum3): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum3!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum3
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum3>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum4 : kotlin.Enum<Enum4> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum4()
|
||||||
|
private constructor Enum4(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum4): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum4!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum4
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum4>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum5 : kotlin.Enum<Enum5> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum5()
|
||||||
|
private constructor Enum5(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum5): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum5!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum5
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum5>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum6 : kotlin.Enum<Enum6> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum6(/*0*/ a: kotlin.String = ...)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum6): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum6!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum6
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum6>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum7 : kotlin.Enum<Enum7> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum7()
|
||||||
|
private constructor Enum7(/*0*/ x: kotlin.Int)
|
||||||
|
private constructor Enum7(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum7): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum7!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum7
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum7>
|
||||||
|
}
|
||||||
|
|
||||||
|
public final enum class Enum8 : kotlin.Enum<Enum8> {
|
||||||
|
enum entry A
|
||||||
|
|
||||||
|
enum entry B
|
||||||
|
|
||||||
|
enum entry C
|
||||||
|
|
||||||
|
private constructor Enum8()
|
||||||
|
private constructor Enum8(/*0*/ x: kotlin.Int)
|
||||||
|
private constructor Enum8(/*0*/ a: kotlin.String)
|
||||||
|
public final val a: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||||
|
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||||
|
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||||
|
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum8): kotlin.Int
|
||||||
|
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||||
|
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Enum8!>!
|
||||||
|
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum8
|
||||||
|
public final /*synthesized*/ fun values(): kotlin.Array<Enum8>
|
||||||
|
}
|
||||||
@@ -7619,6 +7619,16 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
|
|||||||
runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt");
|
runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secondaryConstructorWithoutDelegatingToPrimaryOne.kt")
|
||||||
|
public void testSecondaryConstructorWithoutDelegatingToPrimaryOne() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/enum/secondaryConstructorWithoutDelegatingToPrimaryOne.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature.kt")
|
||||||
|
public void testSecondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/enum/secondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("starImportNestedClassAndEntries.kt")
|
@TestMetadata("starImportNestedClassAndEntries.kt")
|
||||||
public void testStarImportNestedClassAndEntries() throws Exception {
|
public void testStarImportNestedClassAndEntries() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt");
|
runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt");
|
||||||
|
|||||||
Generated
+10
@@ -7614,6 +7614,16 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt");
|
runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secondaryConstructorWithoutDelegatingToPrimaryOne.kt")
|
||||||
|
public void testSecondaryConstructorWithoutDelegatingToPrimaryOne() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/enum/secondaryConstructorWithoutDelegatingToPrimaryOne.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature.kt")
|
||||||
|
public void testSecondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/enum/secondaryConstructorWithoutDelegatingToPrimaryOneWithEnabledFeature.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("starImportNestedClassAndEntries.kt")
|
@TestMetadata("starImportNestedClassAndEntries.kt")
|
||||||
public void testStarImportNestedClassAndEntries() throws Exception {
|
public void testStarImportNestedClassAndEntries() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt");
|
runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt");
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ enum class LanguageFeature(
|
|||||||
AdaptedCallableReferenceAgainstReflectiveType(KOTLIN_1_5, defaultState = LanguageFeature.State.DISABLED),
|
AdaptedCallableReferenceAgainstReflectiveType(KOTLIN_1_5, defaultState = LanguageFeature.State.DISABLED),
|
||||||
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated(KOTLIN_1_5, kind = BUG_FIX),
|
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated(KOTLIN_1_5, kind = BUG_FIX),
|
||||||
InferenceCompatibility(KOTLIN_1_5, kind = BUG_FIX),
|
InferenceCompatibility(KOTLIN_1_5, kind = BUG_FIX),
|
||||||
|
RequiredPrimaryConstructorDelegationCallInEnums(KOTLIN_1_5, kind = BUG_FIX),
|
||||||
|
|
||||||
// Temporarily disabled, see KT-27084/KT-22379
|
// Temporarily disabled, see KT-27084/KT-22379
|
||||||
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
||||||
|
|||||||
Reference in New Issue
Block a user