getting rid of TypeInfo
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
class List<T>(len: Int) {
|
||||
class List<T>(len: Int, cls : java.lang.Class) {
|
||||
val a : Array<T?> = Array<T?>(len)
|
||||
|
||||
fun reverse() {
|
||||
|
||||
@@ -2,11 +2,7 @@ import std.*
|
||||
|
||||
val test = "lala".javaClass
|
||||
|
||||
val test2 = typeinfo<Int>().javaClassForType
|
||||
|
||||
fun box(): String {
|
||||
if(test.getCanonicalName() != "java.lang.String") return "fail"
|
||||
System.out?.println(test2.getCanonicalName())
|
||||
if(test2.getCanonicalName() != "java.lang.Integer") return "fail"
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
class Simple {
|
||||
{
|
||||
jet.TypeInfo blabla = null;
|
||||
new Impossible<String>(blabla);
|
||||
new Impossible<String>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
class GenericArray {
|
||||
public static void ggff() {
|
||||
jet.TypeInfo noise = null;
|
||||
String[] s = namespace.ffgg(noise, new String[0]);
|
||||
String[] s = namespace.ffgg(new String[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,8 @@ import java.util.ArrayList;
|
||||
class ListOfT {
|
||||
|
||||
public static void check() {
|
||||
jet.TypeInfo nobodyCaresAboutTypeinfo = null;
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<String> r = namespace.listOfT(nobodyCaresAboutTypeinfo, list);
|
||||
List<String> r = namespace.listOfT(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ import java.math.BigDecimal;
|
||||
|
||||
class MapOfKString {
|
||||
public static void gfgdgfg() {
|
||||
jet.TypeInfo useless = null;
|
||||
|
||||
Map<BigDecimal, String> map = new HashMap<BigDecimal, String>();
|
||||
|
||||
Map<BigDecimal, String> r = namespace.fff(useless, map);
|
||||
Map<BigDecimal, String> r = namespace.fff(map);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
class Question {
|
||||
// id2 is to prevent java type parameter type inference
|
||||
static <T> T id2(T p) { return p; }
|
||||
{
|
||||
java.util.List<String> s = id2(namespace.id((jet.TypeInfo) null, null));
|
||||
java.util.List<String> s = id2(namespace.id(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
class Question {
|
||||
// id2 is to prevent java type parameter type inference
|
||||
static <T> T id2(T p) { return p; }
|
||||
{
|
||||
String s = id2(namespace.id((jet.TypeInfo) null, null));
|
||||
String s = id2(namespace.id(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
fun <P> foo(vararg tail: P) = 1
|
||||
|
||||
// method: namespace::foo
|
||||
// jvm signature: (Ljet/TypeInfo;[Ljava/lang/Object;)I
|
||||
// generic signature: <P:Ljava/lang/Object;>(Ljet/TypeInfo;[TP;)I
|
||||
// kotlin signature: <P:?Ljava/lang/Object;>(null[TP;)I
|
||||
// jvm signature: ([Ljava/lang/Object;)I
|
||||
// generic signature: <P:Ljava/lang/Object;>([TP;)I
|
||||
// kotlin signature: <P:?Ljava/lang/Object;>([TP;)I
|
||||
// TODO: skip kotlin signature
|
||||
// TODO: properly serialize typeinfo
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class ConstructorWithTypeParameter<P>()
|
||||
|
||||
// method: ConstructorWithTypeParameter::<init>
|
||||
// jvm signature: (Ljet/TypeInfo;)V
|
||||
// jvm signature: ()V
|
||||
// generic signature: null
|
||||
// kotlin signature: null
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
class ConstructorWithTypeParameter<P>(p: P)
|
||||
|
||||
// method: ConstructorWithTypeParameter::<init>
|
||||
// jvm signature: (Ljet/TypeInfo;Ljava/lang/Object;)V
|
||||
// generic signature: (Ljet/TypeInfo;TP;)V
|
||||
// jvm signature: (Ljava/lang/Object;)V
|
||||
// generic signature: (TP;)V
|
||||
// kotlin signature: null
|
||||
|
||||
Reference in New Issue
Block a user