SLC: regression test for final modifier on enum members
^KT-57567
This commit is contained in:
committed by
Ilya Kirillov
parent
a3db0f14af
commit
9fe30bfc12
@@ -0,0 +1,69 @@
|
||||
public static final class Companion /* Event.Companion*/ {
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public final Event upTo(@org.jetbrains.annotations.NotNull() State);// upTo(State)
|
||||
|
||||
private Companion();// .ctor()
|
||||
}
|
||||
|
||||
public static final class Companion /* State.Companion*/ {
|
||||
private Companion();// .ctor()
|
||||
|
||||
public final boolean done(@org.jetbrains.annotations.NotNull() State);// done(State)
|
||||
}
|
||||
|
||||
public enum Event /* Event*/ {
|
||||
ON_CREATE,
|
||||
ON_START,
|
||||
ON_STOP,
|
||||
ON_DESTROY;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final Event.Companion Companion;
|
||||
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public static final Event upTo(State);// upTo(State)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static Event valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static Event[] values();// values()
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static kotlin.enums.EnumEntries<Event> getEntries();// getEntries()
|
||||
|
||||
private Event();// .ctor()
|
||||
|
||||
class Companion ...
|
||||
}
|
||||
|
||||
public enum State /* State*/ {
|
||||
ENQUEUED,
|
||||
RUNNING,
|
||||
SUCCEEDED,
|
||||
FAILED,
|
||||
BLOCKED,
|
||||
CANCELLED;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final State.Companion Companion;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static State valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static State[] values();// values()
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static kotlin.enums.EnumEntries<State> getEntries();// getEntries()
|
||||
|
||||
private State();// .ctor()
|
||||
|
||||
public final boolean isAtLeast(State);// isAtLeast(State)
|
||||
|
||||
public final boolean isFinished();// isFinished()
|
||||
|
||||
class Companion ...
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
public static final class Companion /* Event.Companion*/ {
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public final Event upTo(@org.jetbrains.annotations.NotNull() State);// upTo(State)
|
||||
|
||||
private Companion();// .ctor()
|
||||
}
|
||||
|
||||
public static final class Companion /* State.Companion*/ {
|
||||
private Companion();// .ctor()
|
||||
|
||||
public final boolean done(@org.jetbrains.annotations.NotNull() State);// done(State)
|
||||
}
|
||||
|
||||
public enum Event /* Event*/ {
|
||||
ON_CREATE,
|
||||
ON_START,
|
||||
ON_STOP,
|
||||
ON_DESTROY;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final Event.Companion Companion;
|
||||
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public static final Event upTo(@org.jetbrains.annotations.NotNull() State);// upTo(State)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static Event valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static Event[] values();// values()
|
||||
|
||||
private Event();// .ctor()
|
||||
|
||||
class Companion ...
|
||||
}
|
||||
|
||||
public enum State /* State*/ {
|
||||
ENQUEUED,
|
||||
RUNNING,
|
||||
SUCCEEDED,
|
||||
FAILED,
|
||||
BLOCKED,
|
||||
CANCELLED;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final State.Companion Companion;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static State valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static State[] values();// values()
|
||||
|
||||
private State();// .ctor()
|
||||
|
||||
public final boolean isAtLeast(@org.jetbrains.annotations.NotNull() State);// isAtLeast(State)
|
||||
|
||||
public final boolean isFinished();// isFinished()
|
||||
|
||||
class Companion ...
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
enum class Event {
|
||||
ON_CREATE, ON_START, ON_STOP, ON_DESTROY;
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun upTo(state: State): Event? {
|
||||
return when(state) {
|
||||
State.ENQUEUED -> ON_CREATE
|
||||
State.RUNNING -> ON_START
|
||||
State.BLOCKED -> ON_STOP
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum class State {
|
||||
ENQUEUED, RUNNING, SUCCEEDED, FAILED, BLOCKED, CANCELLED;
|
||||
val isFinished: Boolean
|
||||
get() = this == SUCCEEDED || this == FAILED || this == CANCELLED
|
||||
fun isAtLeast(state: State): Boolean {
|
||||
return compareTo(state) >= 0
|
||||
}
|
||||
companion object {
|
||||
fun done(state: State) = state.isFinished
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
public static final class Companion /* Event.Companion*/ {
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public final Event upTo(@org.jetbrains.annotations.NotNull() State);// upTo(State)
|
||||
|
||||
private Companion();// .ctor()
|
||||
}
|
||||
|
||||
public static final class Companion /* State.Companion*/ {
|
||||
private Companion();// .ctor()
|
||||
|
||||
public final boolean done(@org.jetbrains.annotations.NotNull() State);// done(State)
|
||||
}
|
||||
|
||||
public enum Event /* Event*/ {
|
||||
ON_CREATE,
|
||||
ON_START,
|
||||
ON_STOP,
|
||||
ON_DESTROY;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final Event.Companion Companion;
|
||||
|
||||
@kotlin.jvm.JvmStatic()
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public static final Event upTo(@org.jetbrains.annotations.NotNull() State);// upTo(State)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static Event valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static Event[] values();// values()
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static kotlin.enums.EnumEntries<Event> getEntries();// getEntries()
|
||||
|
||||
private Event();// .ctor()
|
||||
|
||||
class Companion ...
|
||||
}
|
||||
|
||||
public enum State /* State*/ {
|
||||
ENQUEUED,
|
||||
RUNNING,
|
||||
SUCCEEDED,
|
||||
FAILED,
|
||||
BLOCKED,
|
||||
CANCELLED;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static final State.Companion Companion;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static State valueOf(java.lang.String) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;// valueOf(java.lang.String)
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static State[] values();// values()
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static kotlin.enums.EnumEntries<State> getEntries();// getEntries()
|
||||
|
||||
private State();// .ctor()
|
||||
|
||||
public final boolean isAtLeast(@org.jetbrains.annotations.NotNull() State);// isAtLeast(State)
|
||||
|
||||
public final boolean isFinished();// isFinished()
|
||||
|
||||
class Companion ...
|
||||
}
|
||||
Reference in New Issue
Block a user