jet.typeinfo.TypeInfo -> jet.TypeInfo
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class Point() {
|
||||
}
|
||||
|
||||
fun foo() : typeinfo.TypeInfo<Point> {
|
||||
fun foo() : TypeInfo<Point> {
|
||||
val p = Point();
|
||||
return typeinfo.typeinfo<Point>(p);
|
||||
return typeinfo<Point>(p);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
class Simple {
|
||||
{
|
||||
jet.typeinfo.TypeInfo blabla = null;
|
||||
jet.TypeInfo blabla = null;
|
||||
new Impossible<String>(blabla);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
class GenericArray {
|
||||
public static void ggff() {
|
||||
jet.typeinfo.TypeInfo noise = null;
|
||||
jet.TypeInfo noise = null;
|
||||
String[] s = namespace.ffgg(noise, new String[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
class ListOfT {
|
||||
|
||||
public static void check() {
|
||||
jet.typeinfo.TypeInfo nobodyCaresAboutTypeinfo = null;
|
||||
jet.TypeInfo nobodyCaresAboutTypeinfo = null;
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<String> r = namespace.listOfT(nobodyCaresAboutTypeinfo, list);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.math.BigDecimal;
|
||||
|
||||
class MapOfKString {
|
||||
public static void gfgdgfg() {
|
||||
jet.typeinfo.TypeInfo useless = null;
|
||||
jet.TypeInfo useless = null;
|
||||
|
||||
Map<BigDecimal, String> map = new HashMap<BigDecimal, String>();
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@ 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.TypeInfo) null, null));
|
||||
java.util.List<String> s = id2(namespace.id((jet.TypeInfo) null, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ 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.TypeInfo) null, null));
|
||||
String s = id2(namespace.id((jet.TypeInfo) null, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// KT-716 Type inference failed
|
||||
// +JDK
|
||||
|
||||
fun <T> typeinfo.TypeInfo<T>.getJavaClass() : java.lang.Class<T> {
|
||||
fun <T> TypeInfo<T>.getJavaClass() : java.lang.Class<T> {
|
||||
val t : java.lang.Object = this <!CAST_NEVER_SUCCEEDS!>as<!> java.lang.Object
|
||||
return <!UNCHECKED_CAST!>t.getClass() as java.lang.Class<T><!> // inferred type is Object but Serializable was expected
|
||||
}
|
||||
|
||||
fun getJavaClass<T>() = typeinfo.typeinfo<T>.getJavaClass()
|
||||
fun getJavaClass<T>() = typeinfo<T>.getJavaClass()
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
System.out?.println(getJavaClass<String>)
|
||||
|
||||
Reference in New Issue
Block a user