KT-35536: Fix enum constants in KAPT

Enum constants are Pair, so make sure to unpack them correctly.
This commit is contained in:
Ivan Gavrilovic
2019-12-19 11:59:59 +00:00
committed by Yan Zhulanow
parent 62924ddcd4
commit eab6864269
3 changed files with 60 additions and 0 deletions
@@ -21,4 +21,13 @@ object Foo {
object Boo {
val z = foo()
fun foo() = "abc"
}
class HavingState {
val state = State.START
}
enum class State {
START,
FINISH,
}
@@ -116,3 +116,37 @@ public final class Foo {
super();
}
}
////////////////////
import java.lang.System;
@kotlin.Metadata()
public final class HavingState {
@org.jetbrains.annotations.NotNull()
private final State state = State.START;
@org.jetbrains.annotations.NotNull()
public final State getState() {
return null;
}
public HavingState() {
super();
}
}
////////////////////
import java.lang.System;
@kotlin.Metadata()
public enum State {
/*public static final*/ START /* = new State() */,
/*public static final*/ FINISH /* = new State() */;
State() {
}
}