From a4768eda982ed6fb175327a5e698b7185fc1af5f Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 9 Nov 2011 15:21:17 +0300 Subject: [PATCH] TypeInfo should be covariant. Consider the common case in Java when something wants, say, an annotation class. They write Class. We can write just TypeInfo --- compiler/frontend/src/jet/Library.jet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/jet/Library.jet b/compiler/frontend/src/jet/Library.jet index 4012dbc5795..67df91c00bd 100644 --- a/compiler/frontend/src/jet/Library.jet +++ b/compiler/frontend/src/jet/Library.jet @@ -1,13 +1,13 @@ namespace jet namespace typeinfo { - class TypeInfo { + class TypeInfo { fun isSubtypeOf(other : TypeInfo<*>) : Boolean fun isInstance(obj : Any?) : Boolean } fun typeinfo() : TypeInfo - fun typeinfo(expression : T) : TypeInfo + fun typeinfo(expression : T) : TypeInfo } namespace io {