Merge remote branch 'origin/master'
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
namespace jet
|
||||
|
||||
class TypeInfo<T> {
|
||||
fun isSubtypeOf(other : TypeInfo<*>) : Boolean
|
||||
fun isInstance(obj : Any?) : Boolean
|
||||
namespace typeinfo {
|
||||
class TypeInfo<T> {
|
||||
fun isSubtypeOf(other : TypeInfo<*>) : Boolean
|
||||
fun isInstance(obj : Any?) : Boolean
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Iterator<out T> {
|
||||
fun next() : T
|
||||
abstract val hasNext : Boolean
|
||||
|
||||
@@ -90,7 +90,7 @@ public class JetStandardLibrary {
|
||||
this.stringClass = (ClassDescriptor) libraryScope.getClassifier("String");
|
||||
this.arrayClass = (ClassDescriptor) libraryScope.getClassifier("Array");
|
||||
this.iterableClass = (ClassDescriptor) libraryScope.getClassifier("Iterable");
|
||||
this.typeInfoClass = (ClassDescriptor) libraryScope.getClassifier("TypeInfo");
|
||||
this.typeInfoClass = (ClassDescriptor) libraryScope.getNamespace("typeinfo").getMemberScope().getClassifier("TypeInfo");
|
||||
|
||||
this.byteType = new JetTypeImpl(getByte());
|
||||
this.charType = new JetTypeImpl(getChar());
|
||||
|
||||
@@ -82,8 +82,8 @@ public class JetTypeCheckerTest extends LightDaemonAnalyzerTestCase {
|
||||
}
|
||||
|
||||
public void testTypeInfo() throws Exception {
|
||||
assertType("typeof(1)", "TypeInfo<Int>");
|
||||
assertType("typeof(typeof(1))", "TypeInfo<TypeInfo<Int>>");
|
||||
assertType("typeof(1)", "typeinfo.TypeInfo<Int>");
|
||||
assertType("typeof(typeof(1))", "typeinfo.TypeInfo<typeinfo.TypeInfo<Int>>");
|
||||
}
|
||||
|
||||
public void testJumps() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user