Drop package facades: update compiler tests.
This commit is contained in:
+1
-6
@@ -1,9 +1,4 @@
|
|||||||
/**
|
public final class NullableUnitReturnKt {
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
@java.lang.Deprecated
|
|
||||||
public final class _DefaultPackage {
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "NullableUnitReturnKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
public static final kotlin.Unit foo() { /* compiled code */ }
|
public static final kotlin.Unit foo() { /* compiled code */ }
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
// _DefaultPackage
|
// NullableUnitReturnKt
|
||||||
|
|
||||||
fun foo(): Unit? = null
|
fun foo(): Unit? = null
|
||||||
+1
-6
@@ -1,8 +1,3 @@
|
|||||||
/**
|
public final class UnitParameterKt {
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
@java.lang.Deprecated
|
|
||||||
public final class _DefaultPackage {
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "UnitParameterKt")
|
|
||||||
public static final void foo(@org.jetbrains.annotations.NotNull kotlin.Unit s) { /* compiled code */ }
|
public static final void foo(@org.jetbrains.annotations.NotNull kotlin.Unit s) { /* compiled code */ }
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
// _DefaultPackage
|
// UnitParameterKt
|
||||||
|
|
||||||
fun foo(s: Unit) {}
|
fun foo(s: Unit) {}
|
||||||
+2
-7
@@ -1,8 +1,3 @@
|
|||||||
/**
|
public final class VoidReturnKt {
|
||||||
* @deprecated
|
public static final void foo(@org.jetbrains.annotations.NotNull java.lang.String s) { /* compiled code */ }
|
||||||
*/
|
|
||||||
@java.lang.Deprecated
|
|
||||||
public final class _DefaultPackage {
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "VoidReturnKt")
|
|
||||||
public static final void foo(@org.jetbrains.annotations.NotNull java.lang.String g) { /* compiled code */ }
|
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
// _DefaultPackage
|
// VoidReturnKt
|
||||||
|
|
||||||
fun foo(g: String) {}
|
fun foo(g: String) {}
|
||||||
+48
-57
@@ -1,81 +1,72 @@
|
|||||||
/**
|
public final class _DefaultPackageKt {
|
||||||
* @deprecated
|
@org.jetbrains.annotations.Nullable
|
||||||
*/
|
static final java.lang.String nullableVal = "";
|
||||||
@java.lang.Deprecated
|
@org.jetbrains.annotations.Nullable
|
||||||
public final class _DefaultPackage {
|
static java.lang.String nullableVar;
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
@org.jetbrains.annotations.NotNull
|
||||||
|
static final java.lang.String notNullVal = "";
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
|
static java.lang.String notNullVar;
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
|
static final java.lang.String privateNn = "";
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
static final java.lang.String privateN = "";
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
|
public static final java.lang.String notNull(@org.jetbrains.annotations.NotNull java.lang.String a) { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
public static final java.lang.String nullable(@org.jetbrains.annotations.Nullable java.lang.String a) { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
|
public static final java.lang.String notNullWithNN() { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
|
public static final java.lang.String notNullWithN() { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
public static final java.lang.String nullableWithN() { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
public static final java.lang.String nullableWithNN() { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
public static final java.lang.String getNullableVal() { /* compiled code */ }
|
||||||
|
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
public static final java.lang.String getNullableVar() { /* compiled code */ }
|
||||||
|
|
||||||
|
public static final void setNullableVar(@org.jetbrains.annotations.Nullable java.lang.String p) { /* compiled code */ }
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final java.lang.String getNotNullVal() { /* compiled code */ }
|
public static final java.lang.String getNotNullVal() { /* compiled code */ }
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
@org.jetbrains.annotations.NotNull
|
||||||
|
public static final java.lang.String getNotNullVar() { /* compiled code */ }
|
||||||
|
|
||||||
|
public static final void setNotNullVar(@org.jetbrains.annotations.NotNull java.lang.String p) { /* compiled code */ }
|
||||||
|
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final java.lang.String getNotNullValWithGet() { /* compiled code */ }
|
public static final java.lang.String getNotNullValWithGet() { /* compiled code */ }
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.NotNull
|
|
||||||
public static final java.lang.String getNotNullVar() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
public static final void setNotNullVar(@org.jetbrains.annotations.NotNull java.lang.String p) { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
@org.jetbrains.annotations.NotNull
|
|
||||||
public static final java.lang.String getNotNullVarWithGetSet() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
public static final void setNotNullVarWithGetSet(@org.jetbrains.annotations.NotNull java.lang.String v) { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
public static final java.lang.String getNullableVal() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
public static final java.lang.String getNullableValWithGet() { /* compiled code */ }
|
public static final java.lang.String getNullableValWithGet() { /* compiled code */ }
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
public static final java.lang.String getNullableVar() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
public static final void setNullableVar(@org.jetbrains.annotations.Nullable java.lang.String p) { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
public static final java.lang.String getNullableVarWithGetSet() { /* compiled code */ }
|
public static final java.lang.String getNullableVarWithGetSet() { /* compiled code */ }
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final void setNullableVarWithGetSet(@org.jetbrains.annotations.Nullable java.lang.String v) { /* compiled code */ }
|
public static final void setNullableVarWithGetSet(@org.jetbrains.annotations.Nullable java.lang.String v) { /* compiled code */ }
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final java.lang.String notNull(@org.jetbrains.annotations.NotNull java.lang.String a) { /* compiled code */ }
|
static final java.lang.String getPrivateNn() { /* compiled code */ }
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
@org.jetbrains.annotations.NotNull
|
|
||||||
public static final java.lang.String notNullWithN() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.NotNull
|
|
||||||
public static final java.lang.String notNullWithNN() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
public static final java.lang.String nullable(@org.jetbrains.annotations.Nullable java.lang.String a) { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.Nullable
|
|
||||||
public static final java.lang.String nullableWithN() { /* compiled code */ }
|
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinDelegatedMethod(implementationClassName = "_DefaultPackageKt")
|
|
||||||
@org.jetbrains.annotations.NotNull
|
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
public static final java.lang.String nullableWithNN() { /* compiled code */ }
|
public static final java.lang.String nullableWithNN() { /* compiled code */ }
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// _DefaultPackage
|
// _DefaultPackageKt
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull
|
import org.jetbrains.annotations.NotNull
|
||||||
import org.jetbrains.annotations.Nullable
|
import org.jetbrains.annotations.Nullable
|
||||||
|
|||||||
+1
-4
@@ -1,4 +1 @@
|
|||||||
compiler/testData/cli/jvm/classAndFacadeClash.kt:3:1: error: duplicate JVM class name 'test/TestPackage' generated from: package-fragment test, TestPackage
|
OK
|
||||||
class TestPackage {
|
|
||||||
^
|
|
||||||
COMPILATION_ERROR
|
|
||||||
+1
-4
@@ -1,4 +1 @@
|
|||||||
compiler/testData/cli/jvm/fileClassAndFacadeClash.kt:1:1: error: duplicate JVM class name 'test/TestPackage' generated from: package-fragment test, package-fragment test
|
OK
|
||||||
@file:JvmName("TestPackage")
|
|
||||||
^
|
|
||||||
COMPILATION_ERROR
|
|
||||||
+2
-2
@@ -14,13 +14,13 @@ compiler/testData/cli/jvm/signatureClash.kt:9:5: error: platform declaration cla
|
|||||||
val a: Int = 1
|
val a: Int = 1
|
||||||
^
|
^
|
||||||
compiler/testData/cli/jvm/signatureClash.kt:12:1: error: platform declaration clash: The following declarations have the same JVM signature (getB()I):
|
compiler/testData/cli/jvm/signatureClash.kt:12:1: error: platform declaration clash: The following declarations have the same JVM signature (getB()I):
|
||||||
fun <get-b>(): kotlin.Int
|
|
||||||
fun getB(): kotlin.Int
|
fun getB(): kotlin.Int
|
||||||
|
fun <get-b>(): kotlin.Int
|
||||||
fun getB(): Int = 1
|
fun getB(): Int = 1
|
||||||
^
|
^
|
||||||
compiler/testData/cli/jvm/signatureClash.kt:13:1: error: platform declaration clash: The following declarations have the same JVM signature (getB()I):
|
compiler/testData/cli/jvm/signatureClash.kt:13:1: error: platform declaration clash: The following declarations have the same JVM signature (getB()I):
|
||||||
fun <get-b>(): kotlin.Int
|
|
||||||
fun getB(): kotlin.Int
|
fun getB(): kotlin.Int
|
||||||
|
fun <get-b>(): kotlin.Int
|
||||||
val b: Int = 1
|
val b: Int = 1
|
||||||
^
|
^
|
||||||
compiler/testData/cli/jvm/signatureClash.kt:19:7: error: platform declaration clash: The following declarations have the same JVM signature (getTr()I):
|
compiler/testData/cli/jvm/signatureClash.kt:19:7: error: platform declaration clash: The following declarations have the same JVM signature (getTr()I):
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package test;
|
|||||||
public class StarProjection {
|
public class StarProjection {
|
||||||
void foo(K<?> k) {
|
void foo(K<?> k) {
|
||||||
k.foo(null);
|
k.foo(null);
|
||||||
TestPackage.bar(null);
|
StarProjectionKt.bar(null);
|
||||||
new Sub().foo(null);
|
new Sub().foo(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,6 @@ package test;
|
|||||||
|
|
||||||
class Any {
|
class Any {
|
||||||
{
|
{
|
||||||
Object r = TestPackage.anyany(new Object(), null);
|
Object r = AnyKt.anyany(new Object(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ package test;
|
|||||||
class ArrayOfIntArray {
|
class ArrayOfIntArray {
|
||||||
{
|
{
|
||||||
int[][] a = new int[0][];
|
int[][] a = new int[0][];
|
||||||
int[][] r = TestPackage.ohMy(a);
|
int[][] r = ArrayOfIntArrayKt.ohMy(a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ package test;
|
|||||||
class ArrayOfIntArray {
|
class ArrayOfIntArray {
|
||||||
{
|
{
|
||||||
Integer[][] a = new Integer[0][];
|
Integer[][] a = new Integer[0][];
|
||||||
Integer[][] r = TestPackage.ohMy(a, null);
|
Integer[][] r = ArrayOfIntegerArrayKt.ohMy(a, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package test;
|
|||||||
|
|
||||||
class GenericArray {
|
class GenericArray {
|
||||||
{
|
{
|
||||||
TestPackage.noParam("");
|
ExtensionsKt.noParam("");
|
||||||
|
|
||||||
TestPackage.param("", "");
|
ExtensionsKt.param("", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package test;
|
|||||||
|
|
||||||
class GenericArray {
|
class GenericArray {
|
||||||
public static void ggff() {
|
public static void ggff() {
|
||||||
String[] s = TestPackage.ffgg(new String[0]);
|
String[] s = GenericArrayKt.ffgg(new String[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package test;
|
|||||||
|
|
||||||
class Hello {
|
class Hello {
|
||||||
public static void xx() {
|
public static void xx() {
|
||||||
String s = TestPackage.f();
|
String s = HelloKt.f();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package test;
|
|||||||
|
|
||||||
class Int {
|
class Int {
|
||||||
{
|
{
|
||||||
int r = TestPackage.lll(1);
|
int r = IntKt.lll(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package test;
|
|||||||
|
|
||||||
class IntArray {
|
class IntArray {
|
||||||
{
|
{
|
||||||
int[] r = TestPackage.doNothing(new int[0], null);
|
int[] r = IntArrayKt.doNothing(new int[0], null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package test;
|
|||||||
|
|
||||||
class IntWithDefault {
|
class IntWithDefault {
|
||||||
{
|
{
|
||||||
int r = TestPackage.www(1);
|
int r = IntWithDefaultKt.www(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package test;
|
|||||||
|
|
||||||
class IntArray {
|
class IntArray {
|
||||||
{
|
{
|
||||||
Integer[] r = TestPackage.doNothing(new Integer[0], null);
|
Integer[] r = IntegerArrayKt.doNothing(new Integer[0], null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class ListOfInt {
|
|||||||
|
|
||||||
public static void hhh() {
|
public static void hhh() {
|
||||||
List<Integer> list = new ArrayList<Integer>();
|
List<Integer> list = new ArrayList<Integer>();
|
||||||
List<Integer> r = TestPackage.ggg(list);
|
List<Integer> r = ListOfIntKt.ggg(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ import java.util.ArrayList;
|
|||||||
class ListString {
|
class ListString {
|
||||||
public static void gg() {
|
public static void gg() {
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
TestPackage.ff(list);
|
ListOfStringKt.ff(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class ListOfT {
|
|||||||
|
|
||||||
public static void check() {
|
public static void check() {
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
List<String> r = TestPackage.listOfT(list);
|
List<String> r = ListOfTKt.listOfT(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ class MapOfKString {
|
|||||||
public static void gfgdgfg() {
|
public static void gfgdgfg() {
|
||||||
Map<BigDecimal, String> map = new HashMap<BigDecimal, String>();
|
Map<BigDecimal, String> map = new HashMap<BigDecimal, String>();
|
||||||
|
|
||||||
Map<BigDecimal, String> r = TestPackage.fff(map);
|
Map<BigDecimal, String> r = MapOfKStringKt.fff(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ class MapOfKString {
|
|||||||
public static void gfgdgfg() {
|
public static void gfgdgfg() {
|
||||||
Map<String, Integer> map = new HashMap<String, Integer>();
|
Map<String, Integer> map = new HashMap<String, Integer>();
|
||||||
|
|
||||||
Map<String, Integer> r = TestPackage.fff(map);
|
Map<String, Integer> r = MapOfStringIntQKt.fff(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ class Question {
|
|||||||
// id2 is to prevent java type parameter type inference
|
// id2 is to prevent java type parameter type inference
|
||||||
static <T> T id2(T p) { return p; }
|
static <T> T id2(T p) { return p; }
|
||||||
{
|
{
|
||||||
java.util.List<? extends String> s = id2(TestPackage.id(null));
|
java.util.List<? extends String> s = id2(QExtendsListStringKt.id(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ class Question {
|
|||||||
// id2 is to prevent java type parameter type inference
|
// id2 is to prevent java type parameter type inference
|
||||||
static <T> T id2(T p) { return p; }
|
static <T> T id2(T p) { return p; }
|
||||||
{
|
{
|
||||||
String s = id2(TestPackage.id(null));
|
String s = id2(QExtendsStringKt.id(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ import java.util.ArrayList;
|
|||||||
class Vararg {
|
class Vararg {
|
||||||
{
|
{
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
List<String> r = TestPackage.gg(list, 3, 4, 5, 6);
|
List<String> r = VarargKt.gg(list, 3, 4, 5, 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package test;
|
|||||||
|
|
||||||
class Void {
|
class Void {
|
||||||
{
|
{
|
||||||
TestPackage.f();
|
VoidKt.f();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,6 +2,6 @@ package test;
|
|||||||
|
|
||||||
public class PlatformName {
|
public class PlatformName {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
TestPackage.bar();
|
PlatformNameKt.bar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,12 +13,12 @@ class JavaClass {
|
|||||||
catch (E1 e) {}
|
catch (E1 e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TestPackage.one(1);
|
DefaultArgsKt.one(1);
|
||||||
}
|
}
|
||||||
catch (E1 e) {}
|
catch (E1 e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TestPackage.one();
|
DefaultArgsKt.one();
|
||||||
}
|
}
|
||||||
catch (E1 e) {}
|
catch (E1 e) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ package test;
|
|||||||
|
|
||||||
class JavaClass {
|
class JavaClass {
|
||||||
void testMethod() {
|
void testMethod() {
|
||||||
TestPackage.none();
|
TopLevelKt.none();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TestPackage.one();
|
TopLevelKt.one();
|
||||||
}
|
}
|
||||||
catch (E1 e) {}
|
catch (E1 e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TestPackage.two();
|
TopLevelKt.two();
|
||||||
}
|
}
|
||||||
catch (E1 e) {}
|
catch (E1 e) {}
|
||||||
catch (E2 e) {}
|
catch (E2 e) {}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package test;
|
|||||||
|
|
||||||
class GenericArray {
|
class GenericArray {
|
||||||
{
|
{
|
||||||
TestPackage.getVal_("");
|
ExtensionsKt.getVal_("");
|
||||||
|
|
||||||
TestPackage.getVar_("");
|
ExtensionsKt.getVar_("");
|
||||||
TestPackage.setVar_("", "");
|
ExtensionsKt.setVar_("", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package test;
|
|||||||
|
|
||||||
class GenericProperty {
|
class GenericProperty {
|
||||||
void foo() {
|
void foo() {
|
||||||
java.util.Map<String, Integer> o = TestPackage.getTest(new java.util.HashMap<Integer, String>());
|
java.util.Map<String, Integer> o = GenericPropertyKt.getTest(new java.util.HashMap<Integer, String>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@ package test;
|
|||||||
|
|
||||||
public class PlatformName {
|
public class PlatformName {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
int x = TestPackage.vget();
|
int x = PlatformNameKt.vget();
|
||||||
TestPackage.vset(0);
|
PlatformNameKt.vset(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
// FILE: a.kt
|
// FILE: a.kt
|
||||||
<!CONFLICTING_JVM_DECLARATIONS!>val x<!> = 1
|
val x = 1
|
||||||
|
|
||||||
// FILE: b.kt
|
// FILE: b.kt
|
||||||
<!CONFLICTING_JVM_DECLARATIONS!>fun getX()<!> = 1
|
fun getX() = 1
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar"/>
|
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar"/>
|
||||||
|
|
||||||
<java classname="hello.HelloPackage" fork="true">
|
<java classname="hello.HelloKt" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${temp}/hello.jar"/>
|
<pathelement location="${temp}/hello.jar"/>
|
||||||
<pathelement location="${kotlin.runtime.jar}"/>
|
<pathelement location="${kotlin.runtime.jar}"/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar"/>
|
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar"/>
|
||||||
|
|
||||||
<java classname="hello.HelloPackage" fork="true">
|
<java classname="hello.HelloKt" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${temp}/hello.jar"/>
|
<pathelement location="${temp}/hello.jar"/>
|
||||||
<pathelement location="${kotlin.runtime.jar}"/>
|
<pathelement location="${kotlin.runtime.jar}"/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar" modulename="test"/>
|
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar" modulename="test"/>
|
||||||
|
|
||||||
<java classname="hello.HelloPackage" fork="true">
|
<java classname="hello.HelloKt" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${temp}/hello.jar"/>
|
<pathelement location="${temp}/hello.jar"/>
|
||||||
<pathelement location="${kotlin.runtime.jar}"/>
|
<pathelement location="${kotlin.runtime.jar}"/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar"/>
|
<kotlinc src="${test.data}/hello.kt" output="${temp}/hello.jar"/>
|
||||||
|
|
||||||
<java classname="hello.HelloPackage" fork="true">
|
<java classname="hello.HelloKt" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${temp}/hello.jar"/>
|
<pathelement location="${temp}/hello.jar"/>
|
||||||
<pathelement location="${kotlin.runtime.jar}"/>
|
<pathelement location="${kotlin.runtime.jar}"/>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<fileset dir="${temp}/classes"/>
|
<fileset dir="${temp}/classes"/>
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<java classname="hello.HelloPackage" fork="true">
|
<java classname="hello.HelloKt" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${temp}/hello.jar"/>
|
<pathelement location="${temp}/hello.jar"/>
|
||||||
<pathelement location="${kotlin.runtime.jar}"/>
|
<pathelement location="${kotlin.runtime.jar}"/>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun never(): Array<java.lang.CharSequence> = throw Exception()
|
fun never(): Array<java.lang.CharSequence> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::never
|
// method: ArrayOfCharSequenceKt::never
|
||||||
// jvm signature: ()[Ljava/lang/CharSequence;
|
// jvm signature: ()[Ljava/lang/CharSequence;
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun never(): Array<Int> = throw Exception()
|
fun never(): Array<Int> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::never
|
// method: ArrayOfIntKt::never
|
||||||
// jvm signature: ()[Ljava/lang/Integer;
|
// jvm signature: ()[Ljava/lang/Integer;
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun cc(): Comparable<java.lang.CharSequence>? = null
|
fun cc(): Comparable<java.lang.CharSequence>? = null
|
||||||
|
|
||||||
// method: _DefaultPackage::cc
|
// method: ComparableKt::cc
|
||||||
// jvm signature: ()Ljava/lang/Comparable;
|
// jvm signature: ()Ljava/lang/Comparable;
|
||||||
// generic signature: ()Ljava/lang/Comparable<Ljava/lang/CharSequence;>;
|
// generic signature: ()Ljava/lang/Comparable<Ljava/lang/CharSequence;>;
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun key(): Int = throw Exception()
|
fun key(): Int = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::key
|
// method: IntKt::key
|
||||||
// jvm signature: ()I
|
// jvm signature: ()I
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun never(): IntArray = throw Exception()
|
fun never(): IntArray = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::never
|
// method: IntArrayKt::never
|
||||||
// jvm signature: ()[I
|
// jvm signature: ()[I
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun sometimes(): Int? = null
|
fun sometimes(): Int? = null
|
||||||
|
|
||||||
// method: _DefaultPackage::sometimes
|
// method: IntQKt::sometimes
|
||||||
// jvm signature: ()Ljava/lang/Integer;
|
// jvm signature: ()Ljava/lang/Integer;
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
fun foo(p: List<CharSequence>) = 1
|
fun foo(p: List<CharSequence>) = 1
|
||||||
|
|
||||||
// method: _DefaultPackage::foo
|
// method: ListOfCharSequenceKt::foo
|
||||||
// jvm signature: (Ljava/util/List;)I
|
// jvm signature: (Ljava/util/List;)I
|
||||||
// generic signature: (Ljava/util/List<+Ljava/lang/CharSequence;>;)I
|
// generic signature: (Ljava/util/List<+Ljava/lang/CharSequence;>;)I
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
fun listOfStar(): List<*> = throw Exception()
|
fun listOfStar(): List<*> = throw Exception()
|
||||||
|
|
||||||
|
|
||||||
// method: _DefaultPackage::listOfStar
|
// method: ListOfStarKt::listOfStar
|
||||||
// jvm signature: ()Ljava/util/List;
|
// jvm signature: ()Ljava/util/List;
|
||||||
// generic signature: ()Ljava/util/List<*>;
|
// generic signature: ()Ljava/util/List<*>;
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun getEntry(): Map.Entry<Int, String>? = null
|
fun getEntry(): Map.Entry<Int, String>? = null
|
||||||
|
|
||||||
// method: _DefaultPackage::getEntry
|
// method: MapEntryKt::getEntry
|
||||||
// jvm signature: ()Ljava/util/Map$Entry;
|
// jvm signature: ()Ljava/util/Map$Entry;
|
||||||
// generic signature: ()Ljava/util/Map$Entry<Ljava/lang/Integer;Ljava/lang/String;>;
|
// generic signature: ()Ljava/util/Map$Entry<Ljava/lang/Integer;Ljava/lang/String;>;
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun getEntry(): MutableMap.MutableEntry<Int, String>? = null
|
fun getEntry(): MutableMap.MutableEntry<Int, String>? = null
|
||||||
|
|
||||||
// method: _DefaultPackage::getEntry
|
// method: MutableMapEntryKt::getEntry
|
||||||
// jvm signature: ()Ljava/util/Map$Entry;
|
// jvm signature: ()Ljava/util/Map$Entry;
|
||||||
// generic signature: ()Ljava/util/Map$Entry<Ljava/lang/Integer;Ljava/lang/String;>;
|
// generic signature: ()Ljava/util/Map$Entry<Ljava/lang/Integer;Ljava/lang/String;>;
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun foo() = 1
|
fun foo() = 1
|
||||||
|
|
||||||
// method: _DefaultPackage::foo
|
// method: NonGenericKt::foo
|
||||||
// jvm signature: ()I
|
// jvm signature: ()I
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
@@ -2,6 +2,6 @@ class C<T : C<T>>
|
|||||||
|
|
||||||
fun bar(c: C<*>): C<*> = null!!
|
fun bar(c: C<*>): C<*> = null!!
|
||||||
|
|
||||||
// method: _DefaultPackage::bar
|
// method: StarProjectionOutsideClassKt::bar
|
||||||
// jvm signature: (LC;)LC;
|
// jvm signature: (LC;)LC;
|
||||||
// generic signature: (LC<*>;)LC<*>;
|
// generic signature: (LC<*>;)LC<*>;
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun foo(vararg tail: java.lang.CharSequence) = 1
|
fun foo(vararg tail: java.lang.CharSequence) = 1
|
||||||
|
|
||||||
// method: _DefaultPackage::foo
|
// method: VarargCharSequenceKt::foo
|
||||||
// jvm signature: ([Ljava/lang/CharSequence;)I
|
// jvm signature: ([Ljava/lang/CharSequence;)I
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun <P> foo(vararg tail: P) = 1
|
fun <P> foo(vararg tail: P) = 1
|
||||||
|
|
||||||
// method: _DefaultPackage::foo
|
// method: VarargGenericKt::foo
|
||||||
// jvm signature: ([Ljava/lang/Object;)I
|
// jvm signature: ([Ljava/lang/Object;)I
|
||||||
// generic signature: <P:Ljava/lang/Object;>([TP;)I
|
// generic signature: <P:Ljava/lang/Object;>([TP;)I
|
||||||
+1
-1
@@ -4,6 +4,6 @@ class X
|
|||||||
|
|
||||||
fun f(m: M<X, X>): M<X, X> = throw Exception()
|
fun f(m: M<X, X>): M<X, X> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: FunctionTwoTypeParametersKt::f
|
||||||
// jvm signature: (LM;)LM;
|
// jvm signature: (LM;)LM;
|
||||||
// generic signature: (LM<-LX;+LX;>;)LM<LX;LX;>;
|
// generic signature: (LM<-LX;+LX;>;)LM<LX;LX;>;
|
||||||
@@ -2,6 +2,6 @@ class In<in T>
|
|||||||
|
|
||||||
fun f(p: In<String>) {}
|
fun f(p: In<String>) {}
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: InInInPositionKt::f
|
||||||
// jvm signature: (LIn;)V
|
// jvm signature: (LIn;)V
|
||||||
// generic signature: (LIn<-Ljava/lang/String;>;)V
|
// generic signature: (LIn<-Ljava/lang/String;>;)V
|
||||||
+1
-1
@@ -2,6 +2,6 @@ class In<in T>
|
|||||||
|
|
||||||
fun f(): In<String> = throw Exception()
|
fun f(): In<String> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: InInOutPositionKt::f
|
||||||
// jvm signature: ()LIn;
|
// jvm signature: ()LIn;
|
||||||
// generic signature: ()LIn<Ljava/lang/String;>;
|
// generic signature: ()LIn<Ljava/lang/String;>;
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
fun f(p: In<In<X>>) {}
|
fun f(p: In<In<X>>) {}
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: InOfInInInPositionKt::f
|
||||||
// jvm signature: (LIn;)V
|
// jvm signature: (LIn;)V
|
||||||
// generic signature: (LIn<-LIn<-LX;>;>;)V
|
// generic signature: (LIn<-LIn<-LX;>;>;)V
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
fun f(): In<In<X>> = throw Exception()
|
fun f(): In<In<X>> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: InOfInInOutPositionKt::f
|
||||||
// jvm signature: ()LIn;
|
// jvm signature: ()LIn;
|
||||||
// generic signature: ()LIn<LIn<-LX;>;>;
|
// generic signature: ()LIn<LIn<-LX;>;>;
|
||||||
+1
-1
@@ -4,6 +4,6 @@ class X
|
|||||||
|
|
||||||
fun f(p: In<Out<X>>) {}
|
fun f(p: In<Out<X>>) {}
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: InOfOutInInPositionKt::f
|
||||||
// jvm signature: (LIn;)V
|
// jvm signature: (LIn;)V
|
||||||
// generic signature: (LIn<-LOut<+LX;>;>;)V
|
// generic signature: (LIn<-LOut<+LX;>;>;)V
|
||||||
+1
-1
@@ -4,6 +4,6 @@ class X
|
|||||||
|
|
||||||
fun f(): In<Out<X>> = throw Exception()
|
fun f(): In<Out<X>> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: InOfOutInOutPositionKt::f
|
||||||
// jvm signature: ()LIn;
|
// jvm signature: ()LIn;
|
||||||
// generic signature: ()LIn<LOut<+LX;>;>;
|
// generic signature: ()LIn<LOut<+LX;>;>;
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun f(p: List<String>) {}
|
fun f(p: List<String>) {}
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: OutInInPositionKt::f
|
||||||
// jvm signature: (Ljava/util/List;)V
|
// jvm signature: (Ljava/util/List;)V
|
||||||
// generic signature: (Ljava/util/List<+Ljava/lang/String;>;)V
|
// generic signature: (Ljava/util/List<+Ljava/lang/String;>;)V
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun f(): List<String> = throw Exception()
|
fun f(): List<String> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: OutInOutPositionKt::f
|
||||||
// jvm signature: ()Ljava/util/List;
|
// jvm signature: ()Ljava/util/List;
|
||||||
// generic signature: ()Ljava/util/List<Ljava/lang/String;>;
|
// generic signature: ()Ljava/util/List<Ljava/lang/String;>;
|
||||||
+1
-1
@@ -4,6 +4,6 @@ class X
|
|||||||
|
|
||||||
fun f(p: Out<In<X>>) {}
|
fun f(p: Out<In<X>>) {}
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: OutOfInInInPositionKt::f
|
||||||
// jvm signature: (LOut;)V
|
// jvm signature: (LOut;)V
|
||||||
// generic signature: (LOut<+LIn<-LX;>;>;)V
|
// generic signature: (LOut<+LIn<-LX;>;>;)V
|
||||||
+1
-1
@@ -4,6 +4,6 @@ class X
|
|||||||
|
|
||||||
fun f(): Out<In<X>> = throw Exception()
|
fun f(): Out<In<X>> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: OutOfInInOutPositionKt::f
|
||||||
// jvm signature: ()LOut;
|
// jvm signature: ()LOut;
|
||||||
// generic signature: ()LOut<LIn<-LX;>;>;
|
// generic signature: ()LOut<LIn<-LX;>;>;
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
fun f(p: Out<Out<X>>) {}
|
fun f(p: Out<Out<X>>) {}
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: OutOfOutInInPositionKt::f
|
||||||
// jvm signature: (LOut;)V
|
// jvm signature: (LOut;)V
|
||||||
// generic signature: (LOut<+LOut<+LX;>;>;)V
|
// generic signature: (LOut<+LOut<+LX;>;>;)V
|
||||||
+1
-1
@@ -13,6 +13,6 @@ class X
|
|||||||
// thus removing the wildcard would be restricting the use of the return value of the method, and we don't want do this.
|
// thus removing the wildcard would be restricting the use of the return value of the method, and we don't want do this.
|
||||||
fun f(): Out<Out<X>> = throw Exception()
|
fun f(): Out<Out<X>> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: OutOfOutInOutPositionKt::f
|
||||||
// jvm signature: ()LOut;
|
// jvm signature: ()LOut;
|
||||||
// generic signature: ()LOut<LOut<+LX;>;>;
|
// generic signature: ()LOut<LOut<+LX;>;>;
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
val p: M<X> = throw Exception()
|
val p: M<X> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::getP
|
// method: PropertyGetterInKt::getP
|
||||||
// jvm signature: ()LM;
|
// jvm signature: ()LM;
|
||||||
// generic signature: ()LM<LX;>;
|
// generic signature: ()LM<LX;>;
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
val p: M<X> = throw Exception()
|
val p: M<X> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::getP
|
// method: PropertyGetterOutKt::getP
|
||||||
// jvm signature: ()LM;
|
// jvm signature: ()LM;
|
||||||
// generic signature: ()LM<LX;>;
|
// generic signature: ()LM<LX;>;
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
val p: M<X, X> = throw Exception()
|
val p: M<X, X> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::getP
|
// method: PropertyGetterTwoParamsKt::getP
|
||||||
// jvm signature: ()LM;
|
// jvm signature: ()LM;
|
||||||
// generic signature: ()LM<LX;LX;>;
|
// generic signature: ()LM<LX;LX;>;
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
var p: M<X> = throw Exception()
|
var p: M<X> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::setP
|
// method: PropertySetterInKt::setP
|
||||||
// jvm signature: (LM;)V
|
// jvm signature: (LM;)V
|
||||||
// generic signature: (LM<-LX;>;)V
|
// generic signature: (LM<-LX;>;)V
|
||||||
+1
-1
@@ -3,6 +3,6 @@ class X
|
|||||||
|
|
||||||
var p: M<X> = throw Exception()
|
var p: M<X> = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::setP
|
// method: PropertySetterOutKt::setP
|
||||||
// jvm signature: (LM;)V
|
// jvm signature: (LM;)V
|
||||||
// generic signature: (LM<+LX;>;)V
|
// generic signature: (LM<+LX;>;)V
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fun string(): java.lang.String = throw Exception()
|
fun string(): java.lang.String = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::string
|
// method: JlStringKt::string
|
||||||
// jvm signature: ()Ljava/lang/String;
|
// jvm signature: ()Ljava/lang/String;
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
class C<T>
|
class C<T>
|
||||||
fun f(p: Nothing, p1: C<Nothing>, p2: C<C<Nothing>>, p3: C<C<Nothing>>?): Nothing = throw Exception()
|
fun f(p: Nothing, p1: C<Nothing>, p2: C<C<Nothing>>, p3: C<C<Nothing>>?): Nothing = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: NothingKt::f
|
||||||
// jvm signature: (Ljava/lang/Void;LC;LC;LC;)Ljava/lang/Void;
|
// jvm signature: (Ljava/lang/Void;LC;LC;LC;)Ljava/lang/Void;
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class C<T>
|
class C<T>
|
||||||
fun f(p: Nothing?, p1: C<Nothing?>, p2: C<C<Nothing?>>, p3: C<C<Nothing?>>?): Nothing? = throw Exception()
|
fun f(p: Nothing?, p1: C<Nothing?>, p2: C<C<Nothing?>>, p3: C<C<Nothing?>>?): Nothing? = throw Exception()
|
||||||
|
|
||||||
// method: _DefaultPackage::f
|
// method: NullableNothingKt::f
|
||||||
// jvm signature: (Ljava/lang/Void;LC;LC;LC;)Ljava/lang/Void;
|
// jvm signature: (Ljava/lang/Void;LC;LC;LC;)Ljava/lang/Void;
|
||||||
// generic signature: null
|
// generic signature: null
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ public class KotlinLightClassCoherenceTest extends KotlinAsJavaTestBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPackage() throws Exception {
|
public void testFileFacade() throws Exception {
|
||||||
doTest("test.TestPackage");
|
doTest("test.PackageKt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNoModifiers() throws Exception {
|
public void testNoModifiers() throws Exception {
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public abstract class KotlinLightClassStructureTest extends KotlinAsJavaTestBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testPackage() throws Exception {
|
public void testPackage() throws Exception {
|
||||||
checkModifiers("test.TestPackage", PUBLIC, FINAL, DEPRECATED);
|
checkModifiers("test.PackageKt", PUBLIC, FINAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,8 +177,8 @@ public abstract class KotlinLightClassStructureTest extends KotlinAsJavaTestBase
|
|||||||
assertTrue(findMethodsOfClass("test.C").length == 2);
|
assertTrue(findMethodsOfClass("test.C").length == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPackageWithErrors() {
|
public void testFileFacadeWithErrors() {
|
||||||
assertTrue(findMethodsOfClass("test.TestPackage").length == 1);
|
assertTrue(findMethodsOfClass("test.CodeWithErrorsKt").length == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PsiMethod[] findMethodsOfClass(String qualifiedName) {
|
private PsiMethod[] findMethodsOfClass(String qualifiedName) {
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ public class CliCommonTest extends CliBaseTest {
|
|||||||
public void simple() throws Exception {
|
public void simple() throws Exception {
|
||||||
executeCompilerCompareOutputJVM();
|
executeCompilerCompareOutputJVM();
|
||||||
|
|
||||||
Assert.assertTrue(new File(tmpdir.getTmpDir(), PackageClassUtils.getPackageClassName(FqName.ROOT) + ".class").isFile());
|
Assert.assertTrue(new File(tmpdir.getTmpDir(), "SimpleKt.class").isFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void duplicateSources() throws Exception {
|
public void duplicateSources() throws Exception {
|
||||||
executeCompilerCompareOutputJVM();
|
executeCompilerCompareOutputJVM();
|
||||||
|
|
||||||
Assert.assertTrue(new File(tmpdir.getTmpDir(), PackageClassUtils.getPackageClassName(FqName.ROOT) + ".class").isFile());
|
Assert.assertTrue(new File(tmpdir.getTmpDir(), "SimpleKt.class").isFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class K2JvmCliTest extends CliBaseTest {
|
|||||||
public void nonExistingClassPathAndAnnotationsPath() throws Exception {
|
public void nonExistingClassPathAndAnnotationsPath() throws Exception {
|
||||||
executeCompilerCompareOutputJVM();
|
executeCompilerCompareOutputJVM();
|
||||||
|
|
||||||
Assert.assertTrue(new File(tmpdir.getTmpDir(), PackageClassUtils.getPackageClassName(FqName.ROOT) + ".class").isFile());
|
Assert.assertTrue(new File(tmpdir.getTmpDir(), "SimpleKt.class").isFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
|||||||
TestCase.assertTrue("Expecting that compilation 1 ($compileTime1 ms) is at least two times longer than compilation 2 ($compileTime2 ms)",
|
TestCase.assertTrue("Expecting that compilation 1 ($compileTime1 ms) is at least two times longer than compilation 2 ($compileTime2 ms)",
|
||||||
compileTime1 > compileTime2 * 2)
|
compileTime1 > compileTime2 * 2)
|
||||||
logFile.delete()
|
logFile.delete()
|
||||||
run("hello.run", "-cp", jar, "Hello.HelloPackage")
|
run("hello.run", "-cp", jar, "Hello.HelloKt")
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (!daemonShotDown)
|
if (!daemonShotDown)
|
||||||
|
|||||||
@@ -51,21 +51,21 @@ public class CompilerSmokeTest extends KotlinIntegrationTestBase {
|
|||||||
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
|
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
|
||||||
|
|
||||||
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
|
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
|
||||||
run("hello.run", "-cp", jar, "Hello.HelloPackage");
|
run("hello.run", "-cp", jar, "Hello.HelloKt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHelloAppFQMain() throws Exception {
|
public void testHelloAppFQMain() throws Exception {
|
||||||
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
|
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
|
||||||
|
|
||||||
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
|
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
|
||||||
run("hello.run", "-cp", jar, "Hello.HelloPackage");
|
run("hello.run", "-cp", jar, "Hello.HelloKt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHelloAppVarargMain() throws Exception {
|
public void testHelloAppVarargMain() throws Exception {
|
||||||
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
|
String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar";
|
||||||
|
|
||||||
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
|
assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "hello.kt", "-d", jar));
|
||||||
run("hello.run", "-cp", jar, "Hello.HelloPackage");
|
run("hello.run", "-cp", jar, "Hello.HelloKt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCompilationFailed() throws Exception {
|
public void testCompilationFailed() throws Exception {
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ public abstract class AbstractCompileKotlinAgainstInlineKotlinTest : AbstractCom
|
|||||||
try {
|
try {
|
||||||
factory1 = compileA(File(files[1]))
|
factory1 = compileA(File(files[1]))
|
||||||
factory2 = compileB(File(files[0]))
|
factory2 = compileB(File(files[0]))
|
||||||
invokeBox()
|
invokeBox(files[0])
|
||||||
}
|
}
|
||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
var result = ""
|
var result = ""
|
||||||
|
|||||||
+11
-10
@@ -30,8 +30,7 @@ import org.jetbrains.kotlin.codegen.GenerationUtils;
|
|||||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
|
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
|
||||||
import org.jetbrains.kotlin.config.CompilerConfiguration;
|
import org.jetbrains.kotlin.config.CompilerConfiguration;
|
||||||
import org.jetbrains.kotlin.load.kotlin.ModuleVisibilityManager;
|
import org.jetbrains.kotlin.load.kotlin.ModuleVisibilityManager;
|
||||||
import org.jetbrains.kotlin.load.kotlin.PackageClassUtils;
|
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils;
|
||||||
import org.jetbrains.kotlin.name.FqName;
|
|
||||||
import org.jetbrains.kotlin.psi.JetFile;
|
import org.jetbrains.kotlin.psi.JetFile;
|
||||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||||
@@ -59,29 +58,31 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends TestCaseWit
|
|||||||
|
|
||||||
public void doTest(@NotNull String fileName) throws Exception {
|
public void doTest(@NotNull String fileName) throws Exception {
|
||||||
compileA(new File(fileName));
|
compileA(new File(fileName));
|
||||||
compileB(new File(fileName.replaceFirst("A\\.kt$", "B.kt")));
|
String fileNameB = fileName.replaceFirst("A\\.kt$", "B.kt");
|
||||||
invokeMain();
|
compileB(new File(fileNameB));
|
||||||
|
invokeMain(fileNameB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void invokeMain() throws Exception {
|
private void invokeMain(@NotNull String fileName) throws Exception {
|
||||||
Method main = generatedClass().getMethod("main", String[].class);
|
Method main = generatedClass(fileName).getMethod("main", String[].class);
|
||||||
main.invoke(null, new Object[] {ArrayUtil.EMPTY_STRING_ARRAY});
|
main.invoke(null, new Object[] {ArrayUtil.EMPTY_STRING_ARRAY});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void invokeBox() throws Exception {
|
protected void invokeBox(@NotNull String fileName) throws Exception {
|
||||||
Method box = generatedClass().getMethod("box");
|
Method box = generatedClass(fileName).getMethod("box");
|
||||||
String result = (String) box.invoke(null);
|
String result = (String) box.invoke(null);
|
||||||
assertEquals("OK", result);
|
assertEquals("OK", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private Class<?> generatedClass() throws Exception {
|
private Class<?> generatedClass(@NotNull String fileName) throws Exception {
|
||||||
URLClassLoader classLoader = new URLClassLoader(
|
URLClassLoader classLoader = new URLClassLoader(
|
||||||
new URL[]{ bDir.toURI().toURL(), aDir.toURI().toURL() },
|
new URL[]{ bDir.toURI().toURL(), aDir.toURI().toURL() },
|
||||||
ForTestCompileRuntime.runtimeAndReflectJarClassLoader()
|
ForTestCompileRuntime.runtimeAndReflectJarClassLoader()
|
||||||
);
|
);
|
||||||
return classLoader.loadClass(PackageClassUtils.getPackageClassName(FqName.ROOT));
|
String fileLastName = new File(fileName).getName();
|
||||||
|
return classLoader.loadClass(PackagePartClassUtils.getFilePartShortName(fileLastName));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ClassFileFactory compileA(@NotNull File ktAFile) throws IOException {
|
protected ClassFileFactory compileA(@NotNull File ktAFile) throws IOException {
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ public abstract class AbstractCompileKotlinAgainstMultifileKotlinTest : Abstract
|
|||||||
try {
|
try {
|
||||||
factory1 = compileA(File(files[1]))
|
factory1 = compileA(File(files[1]))
|
||||||
factory2 = compileB(File(files[0]))
|
factory2 = compileB(File(files[0]))
|
||||||
invokeBox()
|
invokeBox(files[0])
|
||||||
}
|
}
|
||||||
catch (e: Throwable) {
|
catch (e: Throwable) {
|
||||||
var result = ""
|
var result = ""
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ public class CompileEnvironmentTest extends TestCase {
|
|||||||
File[] files = out.listFiles();
|
File[] files = out.listFiles();
|
||||||
Arrays.sort(files);
|
Arrays.sort(files);
|
||||||
assertEquals(2, files.length);
|
assertEquals(2, files.length);
|
||||||
assertEquals(1, files[0].listFiles().length);//META-INF
|
assertEquals(1, files[0].listFiles().length); //META-INF
|
||||||
assertEquals(2, files[1].listFiles().length);//Smoke package
|
assertEquals(1, files[1].listFiles().length); // SmokeKt
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
FileUtil.delete(tempDir);
|
FileUtil.delete(tempDir);
|
||||||
|
|||||||
+5
-1
@@ -140,13 +140,17 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
|
|||||||
|
|
||||||
val packageScopes = arrayListOf<JetScope>()
|
val packageScopes = arrayListOf<JetScope>()
|
||||||
val classes = arrayListOf<ClassDescriptor>()
|
val classes = arrayListOf<ClassDescriptor>()
|
||||||
|
var shouldAddPackageView = false
|
||||||
for (classFile in allClassFiles) {
|
for (classFile in allClassFiles) {
|
||||||
val className = classFile.relativeTo(tmpdir).substringBeforeLast(".class").replace('/', '.').replace('\\', '.')
|
val className = classFile.relativeTo(tmpdir).substringBeforeLast(".class").replace('/', '.').replace('\\', '.')
|
||||||
|
|
||||||
val klass = classLoader.loadClass(className).sure { "Couldn't load class $className" }
|
val klass = classLoader.loadClass(className).sure { "Couldn't load class $className" }
|
||||||
val header = ReflectKotlinClass.create(klass)?.getClassHeader()
|
val header = ReflectKotlinClass.create(klass)?.getClassHeader()
|
||||||
|
|
||||||
if (header?.kind == KotlinClassHeader.Kind.PACKAGE_FACADE || header?.kind == KotlinClassHeader.Kind.FILE_FACADE) {
|
if (header?.kind == KotlinClassHeader.Kind.PACKAGE_FACADE ||
|
||||||
|
header?.kind == KotlinClassHeader.Kind.FILE_FACADE ||
|
||||||
|
header?.kind == KotlinClassHeader.Kind.MULTIFILE_CLASS
|
||||||
|
) {
|
||||||
val packageView = module.getPackage(LoadDescriptorUtil.TEST_PACKAGE_FQNAME)
|
val packageView = module.getPackage(LoadDescriptorUtil.TEST_PACKAGE_FQNAME)
|
||||||
if (!packageScopes.contains(packageView.memberScope)) {
|
if (!packageScopes.contains(packageView.memberScope)) {
|
||||||
packageScopes.add(packageView.memberScope)
|
packageScopes.add(packageView.memberScope)
|
||||||
|
|||||||
Reference in New Issue
Block a user