Update of /cvsroot/nice/Nice/testsuite/compiler/native
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13107/testsuite/compiler/native
Modified Files:
instanceof.testsuite
Log Message:
Make instanceof work with non-literal type expressions.
Index: instanceof.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/instanceof.testsuite,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** instanceof.testsuite 30 Jul 2004 19:08:42 -0000 1.8
--- instanceof.testsuite 11 Aug 2004 09:06:04 -0000 1.9
***************
*** 45,46 ****
--- 45,52 ----
Object l = [""];
assert l instanceof String[];
+
+ /// PASS
+ assert "".isa(java.lang.String);
+ assert ! "".isa(java.io.File);
+ /// Toplevel
+ <T,U> boolean isa(T value, Class<U> type) = `instanceof`(value, type);
|