jet.typeinfo.TypeInfo -> jet.TypeInfo

This commit is contained in:
Andrey Breslav
2011-12-26 18:59:48 +04:00
parent 5653dabe95
commit 3b0ca42e0b
113 changed files with 91 additions and 236 deletions
+2 -26
View File
@@ -1,6 +1,6 @@
package jet
package typeinfo {
//package typeinfo {
class TypeInfo<out T> {
fun isSubtypeOf(other : TypeInfo<*>) : Boolean
fun isInstance(obj : Any?) : Boolean
@@ -8,31 +8,7 @@ package typeinfo {
fun typeinfo<T>() : TypeInfo<T>
fun typeinfo<T>(expression : T) : TypeInfo<T>
}
package io {
fun print(message : Any?)
fun print(message : Int)
fun print(message : Long)
fun print(message : Byte)
fun print(message : Short)
fun print(message : Char)
fun print(message : Boolean)
fun print(message : Float)
fun print(message : Double)
fun println(message : Any?)
fun println(message : Int)
fun println(message : Long)
fun println(message : Byte)
fun println(message : Short)
fun println(message : Char)
fun println(message : Boolean)
fun println(message : Float)
fun println(message : Double)
fun readLine() : String?
}
//}
fun <R> Any.synchronized(block : () -> R) : R
@@ -7,10 +7,11 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.JetSemanticServices;
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
import org.jetbrains.jet.lang.descriptors.FunctionDescriptor;
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.*;
import org.jetbrains.jet.lang.resolve.AnalyzingUtils;
import org.jetbrains.jet.lang.resolve.BindingTraceContext;
import org.jetbrains.jet.lang.resolve.TopDownAnalyzer;
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
import org.jetbrains.jet.lang.resolve.scopes.RedeclarationHandler;
import org.jetbrains.jet.lang.resolve.scopes.WritableScope;
@@ -120,7 +121,6 @@ public class JetStandardLibrary {
private JetType tuple0Type;
private JetType nullableStringType;
private NamespaceDescriptor typeInfoNamespace;
private Set<FunctionDescriptor> typeInfoFunction;
private JetStandardLibrary(@NotNull Project project) {
@@ -168,9 +168,9 @@ public class JetStandardLibrary {
this.arrayClass = (ClassDescriptor) libraryScope.getClassifier("Array");
this.iterableClass = (ClassDescriptor) libraryScope.getClassifier("Iterable");
typeInfoNamespace = libraryScope.getNamespace("typeinfo");
this.typeInfoClass = (ClassDescriptor) typeInfoNamespace.getMemberScope().getClassifier("TypeInfo");
typeInfoFunction = typeInfoNamespace.getMemberScope().getFunctions("typeinfo");
// typeInfoNamespace = libraryScope.getNamespace("typeinfo");
this.typeInfoClass = (ClassDescriptor) libraryScope.getClassifier("TypeInfo");
this.typeInfoFunction = libraryScope.getFunctions("typeinfo");
this.byteType = new JetTypeImpl(getByte());
this.charType = new JetTypeImpl(getChar());
@@ -297,11 +297,11 @@ public class JetStandardLibrary {
return iterableClass;
}
public NamespaceDescriptor getTypeInfoNamespace() {
initStdClasses();
return typeInfoNamespace;
}
// public NamespaceDescriptor getTypeInfoNamespace() {
// initStdClasses();
// return typeInfoNamespace;
// }
//
public ClassDescriptor getTypeInfo() {
initStdClasses();
return typeInfoClass;