javac-wrapper: refactoring, fixes and tests
This commit is contained in:
committed by
Alexander Baratynskiy
parent
8494e54608
commit
01883a41cb
@@ -16,7 +16,5 @@ public abstract enum class AbstractEnum : kotlin.Enum<test.AbstractEnum!> {
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.AbstractEnum
|
||||
public open fun valueOf(/*0*/ kotlin.String!): test.AbstractEnum!
|
||||
public open fun values(): kotlin.Array<(out) test.AbstractEnum!>!
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.AbstractEnum>
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ public open class ClassWithNestedEnum {
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.ClassWithNestedEnum.NestedEnum
|
||||
public open fun valueOf(/*0*/ kotlin.String!): test.ClassWithNestedEnum.NestedEnum!
|
||||
public open fun values(): kotlin.Array<(out) test.ClassWithNestedEnum.NestedEnum!>!
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.ClassWithNestedEnum.NestedEnum>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,6 @@ public/*package*/ interface Interface {
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.Interface.Kind
|
||||
public open fun valueOf(/*0*/ kotlin.String!): test.Interface.Kind!
|
||||
public open fun values(): kotlin.Array<(out) test.Interface.Kind!>!
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Interface.Kind>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,5 @@ public final enum class Enum : kotlin.Enum<test.Enum!> {
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.Enum
|
||||
public open fun valueOf(/*0*/ kotlin.String!): test.Enum!
|
||||
public open fun values(): kotlin.Array<(out) test.Enum!>!
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Enum>
|
||||
}
|
||||
|
||||
@@ -17,7 +17,5 @@ public final enum class EnumName : kotlin.Enum<test.EnumName!> {
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.EnumName
|
||||
public open fun valueOf(/*0*/ kotlin.String!): test.EnumName!
|
||||
public open fun values(): kotlin.Array<(out) test.EnumName!>!
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumName>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package test;
|
||||
|
||||
public enum EnumValues {
|
||||
OK(0),
|
||||
COMPILATION_ERROR(1),
|
||||
INTERNAL_ERROR(2),
|
||||
SCRIPT_EXECUTION_ERROR(3);
|
||||
|
||||
private final int code;
|
||||
|
||||
EnumValues(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
fun findCode(code: Int) = Locale.Category.values()
|
||||
@@ -0,0 +1,27 @@
|
||||
package test
|
||||
|
||||
public fun findCode(/*0*/ kotlin.Int): kotlin.Array<java.util.Locale.Category>
|
||||
|
||||
public final enum class EnumValues : kotlin.Enum<test.EnumValues!> {
|
||||
enum entry OK
|
||||
|
||||
enum entry COMPILATION_ERROR
|
||||
|
||||
enum entry INTERNAL_ERROR
|
||||
|
||||
enum entry SCRIPT_EXECUTION_ERROR
|
||||
|
||||
private constructor EnumValues(/*0*/ kotlin.Int)
|
||||
private final val code: kotlin.Int
|
||||
public final /*fake_override*/ val name: kotlin.String
|
||||
public final /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final /*fake_override*/ fun compareTo(/*0*/ test.EnumValues!): kotlin.Int
|
||||
protected/*protected and package*/ final /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public open fun getCode(): kotlin.Int
|
||||
public final /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<test.EnumValues!>!
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.EnumValues
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumValues>
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
public abstract class InnerWithGenericOuter<T> {
|
||||
|
||||
public class Module {
|
||||
}
|
||||
|
||||
protected abstract void test(Module module);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
class BasicTest : InnerWithGenericOuter<String>() {
|
||||
|
||||
override fun test(module: Module) {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package test
|
||||
|
||||
public final class BasicTest : test.InnerWithGenericOuter<kotlin.String> {
|
||||
public constructor BasicTest()
|
||||
protected open fun test(/*0*/ test.InnerWithGenericOuter<kotlin.String>.Module): kotlin.Unit
|
||||
}
|
||||
|
||||
public abstract class InnerWithGenericOuter</*0*/ T : kotlin.Any!> {
|
||||
public constructor InnerWithGenericOuter</*0*/ T : kotlin.Any!>()
|
||||
protected/*protected and package*/ abstract fun test(/*0*/ test.InnerWithGenericOuter<T!>.Module!): kotlin.Unit
|
||||
|
||||
public open inner class Module /*captured type parameters: /*0*/ T : kotlin.Any!*/ {
|
||||
public constructor Module()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
public class JavaLangClass {
|
||||
|
||||
public static void func(Class<String> aClass) {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun doNothing() = JavaLangClass.func(String::class.java)
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
public fun doNothing(): kotlin.Unit
|
||||
|
||||
public open class JavaLangClass {
|
||||
public constructor JavaLangClass()
|
||||
|
||||
// Static members
|
||||
public open fun func(/*0*/ java.lang.Class<kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
@@ -19,8 +19,6 @@ public/*package*/ final enum class Kind : kotlin.Enum<test.Kind!> {
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.Kind
|
||||
public open fun valueOf(/*0*/ kotlin.String!): test.Kind!
|
||||
public open fun values(): kotlin.Array<(out) test.Kind!>!
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.Kind>
|
||||
}
|
||||
|
||||
|
||||
@@ -4,4 +4,6 @@ public class ReturnType {
|
||||
|
||||
public static javax.lang.model.element.Element getElement() { return null; }
|
||||
|
||||
public static java.lang.Class<String> getJavaLangClass() { return null; }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
fun getElement() = ReturnType.getElement()
|
||||
|
||||
fun getJavaLangClass() = ReturnType.getJavaLangClass()
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package test
|
||||
|
||||
public fun getElement(): javax.lang.model.element.Element!
|
||||
public fun getJavaLangClass(): java.lang.Class<kotlin.String!>!
|
||||
|
||||
public open class ReturnType {
|
||||
public constructor ReturnType()
|
||||
|
||||
// Static members
|
||||
public open fun getElement(): javax.lang.model.element.Element!
|
||||
public open fun getJavaLangClass(): java.lang.Class<kotlin.String!>!
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package test;
|
||||
|
||||
public class UseKotlinInner extends KotlinClass {
|
||||
|
||||
KotlinInner getKotlinInner() { return null; }
|
||||
|
||||
JavaInner getJavaInner() { return null; }
|
||||
|
||||
KotlinInner3 getKotlinInner3() { return null; }
|
||||
}
|
||||
|
||||
class JavaClass2 {
|
||||
|
||||
static class JavaInner {}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package test
|
||||
|
||||
private open class KotlinClass : KotlinInterface.KotlinInner2() {
|
||||
|
||||
inner class KotlinInner
|
||||
|
||||
}
|
||||
|
||||
private interface KotlinInterface {
|
||||
open class KotlinInner2 : JavaClass2() {
|
||||
class KotlinInner3
|
||||
}
|
||||
}
|
||||
|
||||
private fun getKotlinInner() = UseKotlinInner().kotlinInner
|
||||
|
||||
private fun getJavaInner() = UseKotlinInner().javaInner
|
||||
|
||||
private fun getKotlinInner3() = UseKotlinInner().kotlinInner3
|
||||
@@ -1,39 +0,0 @@
|
||||
package test
|
||||
|
||||
private fun getJavaInner(): test.JavaClass2.JavaInner!
|
||||
private fun getKotlinInner(): test.KotlinClass.KotlinInner!
|
||||
private fun getKotlinInner3(): test.KotlinInterface.KotlinInner2.KotlinInner3!
|
||||
|
||||
public/*package*/ open class JavaClass2 {
|
||||
public/*package*/ constructor JavaClass2()
|
||||
|
||||
public/*package*/ open class JavaInner {
|
||||
public/*package*/ constructor JavaInner()
|
||||
}
|
||||
}
|
||||
|
||||
private open class KotlinClass : test.KotlinInterface.KotlinInner2 {
|
||||
public constructor KotlinClass()
|
||||
|
||||
public final inner class KotlinInner {
|
||||
public constructor KotlinInner()
|
||||
}
|
||||
}
|
||||
|
||||
private interface KotlinInterface {
|
||||
|
||||
public open class KotlinInner2 : test.JavaClass2 {
|
||||
public constructor KotlinInner2()
|
||||
|
||||
public final class KotlinInner3 {
|
||||
public constructor KotlinInner3()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public open class UseKotlinInner : test.KotlinClass {
|
||||
public constructor UseKotlinInner()
|
||||
public/*package*/ open fun getJavaInner(): test.JavaClass2.JavaInner!
|
||||
public/*package*/ open fun getKotlinInner(): test.KotlinClass.KotlinInner!
|
||||
public/*package*/ open fun getKotlinInner3(): test.KotlinInterface.KotlinInner2.KotlinInner3!
|
||||
}
|
||||
Reference in New Issue
Block a user