Minor, package "test" in compileJavaAgainstKotlin testData
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package test;
|
||||
|
||||
class Any {
|
||||
{
|
||||
Object r = _DefaultPackage.anyany(new Object(), null);
|
||||
Object r = TestPackage.anyany(new Object(), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
package test
|
||||
|
||||
// extra parameter is to preserve generic signature
|
||||
fun anyany(a: Any, ignore: java.util.List<String>) = a
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package test;
|
||||
|
||||
|
||||
class ArrayOfIntArray {
|
||||
{
|
||||
int[][] a = new int[0][];
|
||||
int[][] r = _DefaultPackage.ohMy(a);
|
||||
int[][] r = TestPackage.ohMy(a);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun ohMy(p: Array<IntArray>) = p
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package test;
|
||||
|
||||
|
||||
class ArrayOfIntArray {
|
||||
{
|
||||
Integer[][] a = new Integer[0][];
|
||||
Integer[][] r = _DefaultPackage.ohMy(a, null);
|
||||
Integer[][] r = TestPackage.ohMy(a, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
package test
|
||||
|
||||
// extra parameter is to make sure generic signature is generated
|
||||
fun ohMy(p: Array<Array<Int>>, ignore: java.util.List<String>) = p
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
public static void main(String[] args) {
|
||||
_DefaultPackage.foo$default(1, 0);
|
||||
TestPackage.foo$default(1, 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun foo(a: Int = 1) {}
|
||||
@@ -1,7 +1,9 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
public static void main(String[] args) {
|
||||
Test test = new Test();
|
||||
test.foo();
|
||||
test.getBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait Trait {
|
||||
fun foo()
|
||||
val bar: Int
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package test;
|
||||
|
||||
class GenericArray {
|
||||
public static void ggff() {
|
||||
String[] s = _DefaultPackage.ffgg(new String[0]);
|
||||
String[] s = TestPackage.ffgg(new String[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P> ffgg(a: Array<P>) = a
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package test;
|
||||
|
||||
|
||||
class Hello {
|
||||
public static void xx() {
|
||||
String s = _DefaultPackage.f();
|
||||
String s = TestPackage.f();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun f() = "hello"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package test;
|
||||
|
||||
|
||||
class Int {
|
||||
{
|
||||
int r = _DefaultPackage.lll(1);
|
||||
int r = TestPackage.lll(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun lll(a: Int) = a
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package test;
|
||||
|
||||
|
||||
class IntArray {
|
||||
{
|
||||
int[] r = _DefaultPackage.doNothing(new int[0], null);
|
||||
int[] r = TestPackage.doNothing(new int[0], null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
package test
|
||||
|
||||
// extra parameter is to make sure generic signature is not erased
|
||||
fun doNothing(array: IntArray, ignore: java.util.List<String>) = array
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package test;
|
||||
|
||||
|
||||
class IntWithDefault {
|
||||
{
|
||||
int r = _DefaultPackage.www(1);
|
||||
int r = TestPackage.www(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun www(p: Int = 1) = p
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package test;
|
||||
|
||||
|
||||
class IntArray {
|
||||
{
|
||||
Integer[] r = _DefaultPackage.doNothing(new Integer[0], null);
|
||||
Integer[] r = TestPackage.doNothing(new Integer[0], null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
package test
|
||||
|
||||
// extra parameter is to make sure generic signature is preserved
|
||||
fun doNothing(array: Array<Int>, ignore: java.util.List<String>) = array
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -5,7 +7,7 @@ class ListOfInt {
|
||||
|
||||
public static void hhh() {
|
||||
List<Integer> list = new ArrayList<Integer>();
|
||||
List<Integer> r = _DefaultPackage.ggg(list);
|
||||
List<Integer> r = TestPackage.ggg(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun ggg(list: List<Int>) = list
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ListString {
|
||||
public static void gg() {
|
||||
List<String> list = new ArrayList<String>();
|
||||
_DefaultPackage.ff(list);
|
||||
TestPackage.ff(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun ff(p: List<String>) = 1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -5,7 +7,7 @@ class ListOfT {
|
||||
|
||||
public static void check() {
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<String> r = _DefaultPackage.listOfT(list);
|
||||
List<String> r = TestPackage.listOfT(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P> listOfT(list: List<P>) = list
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
@@ -6,6 +8,6 @@ class MapOfKString {
|
||||
public static void gfgdgfg() {
|
||||
Map<BigDecimal, String> map = new HashMap<BigDecimal, String>();
|
||||
|
||||
Map<BigDecimal, String> r = _DefaultPackage.fff(map);
|
||||
Map<BigDecimal, String> r = TestPackage.fff(map);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
package test
|
||||
|
||||
|
||||
fun <K> fff(map: Map<K, String>) = map
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
@@ -6,6 +8,6 @@ class MapOfKString {
|
||||
public static void gfgdgfg() {
|
||||
Map<String, Integer> map = new HashMap<String, Integer>();
|
||||
|
||||
Map<String, Integer> r = _DefaultPackage.fff(map);
|
||||
Map<String, Integer> r = TestPackage.fff(map);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
package test
|
||||
|
||||
|
||||
fun fff(map: Map<String, Int?>) = map
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package test;
|
||||
|
||||
class Question {
|
||||
// id2 is to prevent java type parameter type inference
|
||||
static <T> T id2(T p) { return p; }
|
||||
{
|
||||
java.util.List<? extends String> s = id2(_DefaultPackage.id(null));
|
||||
java.util.List<? extends String> s = id2(TestPackage.id(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <P1 : List<String>> id(p: P1) = p
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package test;
|
||||
|
||||
class Question {
|
||||
// id2 is to prevent java type parameter type inference
|
||||
static <T> T id2(T p) { return p; }
|
||||
{
|
||||
String s = id2(_DefaultPackage.id(null));
|
||||
String s = id2(TestPackage.id(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun <T : String> id(p: T) = p
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class Vararg {
|
||||
{
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<String> r = _DefaultPackage.gg(list, 3, 4, 5, 6);
|
||||
List<String> r = TestPackage.gg(list, 3, 4, 5, 6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun gg(list: List<String>, vararg ints: Int) = list
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package test;
|
||||
|
||||
class Void {
|
||||
{
|
||||
_DefaultPackage.f();
|
||||
TestPackage.f();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
package test
|
||||
|
||||
fun f() { }
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsB extends B {
|
||||
void test() {
|
||||
byte x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
A<Integer> a = new B();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
A<Integer> a = new B();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class Test extends B {
|
||||
void test() {
|
||||
int x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A {
|
||||
fun foo(): Any
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class Test extends B {
|
||||
void test() {
|
||||
A<Integer> a = new B();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsB extends B {
|
||||
void test() {
|
||||
int x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T : Comparable<T>> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsB extends B {
|
||||
void test() {
|
||||
int x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T : Number> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsB extends B {
|
||||
void test() {
|
||||
int x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsD extends D {
|
||||
void test() {
|
||||
int x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsB extends B {
|
||||
void test() {
|
||||
int x = foo();
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class ExtendsB extends B {
|
||||
@Override
|
||||
public Integer foo() {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun foo(): T
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void testMethod() {
|
||||
Test test = new Test();
|
||||
@@ -14,4 +16,4 @@ class JavaClass {
|
||||
catch (E1 e) {}
|
||||
catch (E2 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
class E2: Exception()
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void testMethod() {
|
||||
new None();
|
||||
@@ -18,4 +20,4 @@ class JavaClass {
|
||||
catch (E1 e) {}
|
||||
catch (E2 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
class E2: Exception()
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void testMethod(One instance) {
|
||||
try {
|
||||
@@ -21,13 +23,13 @@ class JavaClass {
|
||||
catch (E1 e) {}
|
||||
|
||||
try {
|
||||
_DefaultPackage.one(1);
|
||||
TestPackage.one(1);
|
||||
}
|
||||
catch (E1 e) {}
|
||||
|
||||
try {
|
||||
_DefaultPackage.one$default(1, 0);
|
||||
TestPackage.one$default(1, 0);
|
||||
}
|
||||
catch (E1 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
|
||||
throws(javaClass<E1>())
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void testMethod() {
|
||||
Test test = new Test();
|
||||
@@ -14,4 +16,4 @@ class JavaClass {
|
||||
catch (E1 e) {}
|
||||
catch (E2 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
class E2: Exception()
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
@@ -5,4 +7,4 @@ class JavaClass {
|
||||
}
|
||||
catch (E1 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
|
||||
trait Base<T> {
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void testMethod() {
|
||||
_DefaultPackage.none();
|
||||
TestPackage.none();
|
||||
|
||||
try {
|
||||
_DefaultPackage.one();
|
||||
TestPackage.one();
|
||||
}
|
||||
catch (E1 e) {}
|
||||
|
||||
try {
|
||||
_DefaultPackage.two();
|
||||
TestPackage.two();
|
||||
}
|
||||
catch (E1 e) {}
|
||||
catch (E2 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
class E2: Exception()
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void testMethod() {
|
||||
Test test = new Test();
|
||||
@@ -14,4 +16,4 @@ class JavaClass {
|
||||
catch (E1 e) {}
|
||||
catch (E2 e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package test
|
||||
|
||||
class E1: Exception()
|
||||
class E2: Exception()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user