Kapt: Support all kinds of constant types (KT-35536)

This commit is contained in:
Yan Zhulanow
2019-12-25 20:29:09 +09:00
parent 532e879d5c
commit 520f9a6da5
4 changed files with 185 additions and 54 deletions
@@ -25,6 +25,17 @@ object Boo {
class HavingState {
val state = State.START
val stateArray = arrayOf(State.START)
val stringArray = arrayOf("foo")
val stringList = listOf("foo")
val intArray = arrayOf(1)
val intList = listOf(1)
val uint = 1U
val uintArray = arrayOf(1U)
val uintList = listOf(1U)
val clazz = State::class
val javaClass = State::class.java
val anonymous = (object {})::class
}
enum class State {
@@ -126,12 +126,87 @@ import java.lang.System;
public final class HavingState {
@org.jetbrains.annotations.NotNull()
private final State state = State.START;
@org.jetbrains.annotations.NotNull()
private final State[] stateArray = {State.START};
@org.jetbrains.annotations.NotNull()
private final java.lang.String[] stringArray = {"foo"};
@org.jetbrains.annotations.NotNull()
private final java.util.List<java.lang.String> stringList = null;
@org.jetbrains.annotations.NotNull()
private final java.lang.Integer[] intArray = {1};
@org.jetbrains.annotations.NotNull()
private final java.util.List<java.lang.Integer> intList = null;
private final int uint = 1;
@org.jetbrains.annotations.NotNull()
private final kotlin.UInt[] uintArray = {1};
@org.jetbrains.annotations.NotNull()
private final java.util.List<kotlin.UInt> uintList = null;
@org.jetbrains.annotations.NotNull()
private final kotlin.reflect.KClass<State> clazz = null;
@org.jetbrains.annotations.NotNull()
private final java.lang.Class<State> javaClass = null;
@org.jetbrains.annotations.NotNull()
private final kotlin.reflect.KClass<? extends java.lang.Object> anonymous = null;
@org.jetbrains.annotations.NotNull()
public final State getState() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final State[] getStateArray() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final java.lang.String[] getStringArray() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final java.util.List<java.lang.String> getStringList() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final java.lang.Integer[] getIntArray() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final java.util.List<java.lang.Integer> getIntList() {
return null;
}
public final int getUint() {
return 0;
}
@org.jetbrains.annotations.NotNull()
public final kotlin.UInt[] getUintArray() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final java.util.List<kotlin.UInt> getUintList() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final kotlin.reflect.KClass<State> getClazz() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final java.lang.Class<State> getJavaClass() {
return null;
}
@org.jetbrains.annotations.NotNull()
public final kotlin.reflect.KClass<? extends java.lang.Object> getAnonymous() {
return null;
}
public HavingState() {
super();
}