move compileJavaAgainstKotlin tests
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
|
||||
class Any {
|
||||
{
|
||||
Object r = namespace.anyany(new Object(), null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
// extra parameter is to preserve generic signature
|
||||
fun anyany(a: Any, ignore: java.util.List<String>) = a
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
class ArrayOfIntArray {
|
||||
{
|
||||
int[][] a = new int[0][];
|
||||
int[][] r = namespace.ohMy(a);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun ohMy(p: Array<IntArray>) = p
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
class ArrayOfIntArray {
|
||||
{
|
||||
Integer[][] a = new Integer[0][];
|
||||
Integer[][] r = namespace.ohMy(a, null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
// extra parameter is to make sure generic signature is generated
|
||||
fun ohMy(p: Array<Array<Int>>, ignore: java.util.List<String>) = p
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
class GenericArray {
|
||||
public static void ggff() {
|
||||
jet.typeinfo.TypeInfo noise = null;
|
||||
String[] s = namespace.ffgg(noise, new String[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun <P> ffgg(a: Array<P>) = a
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
class Hello {
|
||||
public static void xx() {
|
||||
String s = namespace.f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun f() = "hello"
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
class Int {
|
||||
{
|
||||
int r = namespace.lll(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun lll(a: Int) = a
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
class IntArray {
|
||||
{
|
||||
int[] r = namespace.doNothing(new int[0], null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
// extra parameter is to make sure generic signature is not erased
|
||||
fun doNothing(array: IntArray, ignore: java.util.List<String>) = array
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
class IntWithDefault {
|
||||
{
|
||||
int r = namespace.www(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun www(p: Int = 1) = p
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
class IntArray {
|
||||
{
|
||||
Integer[] r = namespace.doNothing(new Integer[0], null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
// extra parameter is to make sure generic signature is preserved
|
||||
fun doNothing(array: Array<Int>, ignore: java.util.List<String>) = array
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ListOfInt {
|
||||
|
||||
public static void hhh() {
|
||||
List<Integer> list = new ArrayList<Integer>();
|
||||
List<Integer> r = namespace.ggg(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import java.util.List
|
||||
|
||||
fun ggg(list: List<Int>) = list
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ListString {
|
||||
public static void gg() {
|
||||
List<String> list = new ArrayList<String>();
|
||||
namespace.ff(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import java.util.List
|
||||
|
||||
fun ff(p: List<String>) = 1
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ListOfT {
|
||||
|
||||
public static void check() {
|
||||
jet.typeinfo.TypeInfo nobodyCaresAboutTypeinfo = null;
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<String> r = namespace.listOfT(nobodyCaresAboutTypeinfo, list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import java.util.List
|
||||
|
||||
fun <P> listOfT(list: List<P>) = list
|
||||
@@ -0,0 +1,13 @@
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
class MapOfKString {
|
||||
public static void gfgdgfg() {
|
||||
jet.typeinfo.TypeInfo useless = null;
|
||||
|
||||
Map<BigDecimal, String> map = new HashMap<BigDecimal, String>();
|
||||
|
||||
Map<BigDecimal, String> r = namespace.fff(useless, map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import java.util.Map
|
||||
|
||||
fun <K> fff(map: Map<K, String>) = map
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
class MapOfKString {
|
||||
public static void gfgdgfg() {
|
||||
Map<String, Integer> map = new HashMap<String, Integer>();
|
||||
|
||||
Map<String, Integer> r = namespace.fff(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import java.util.Map
|
||||
|
||||
fun fff(map: Map<String, Int?>) = map
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class Vararg {
|
||||
{
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<String> r = namespace.gg(list, 3, 4, 5, 6);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import java.util.List;
|
||||
|
||||
fun gg(list: List<String>, vararg ints: Int) = list
|
||||
@@ -0,0 +1,5 @@
|
||||
class Void {
|
||||
{
|
||||
namespace.f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun f() { }
|
||||
Reference in New Issue
Block a user