[Nice-commit] Nice/testsuite/compiler/typing arrays.testsuite,1.2,1.3 final.testsuite,1.1,1.2 null.t
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-10-13 18:29:39
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18045/F:/nice/testsuite/compiler/typing Modified Files: arrays.testsuite final.testsuite null.testsuite polymorphism.testsuite Log Message: Removed the deprecated 'Any' keyword. Index: final.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/final.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** final.testsuite 25 Jun 2002 07:06:05 -0000 1.1 --- final.testsuite 13 Oct 2004 18:28:51 -0000 1.2 *************** *** 4,8 **** final class F2 extends F1 {} ! <Any T> T ff(T); ff(x) = x; --- 4,8 ---- final class F2 extends F1 {} ! <T> T ff(T); ff(x) = x; Index: arrays.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/arrays.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** arrays.testsuite 2 Mar 2004 17:25:33 -0000 1.2 --- arrays.testsuite 13 Oct 2004 18:28:51 -0000 1.3 *************** *** 7,24 **** /// PASS /// Toplevel ! <Any T> T id(T x) = x; ! <Any Z> void f(Z[] a) { id(new Z[1]); } /// FAIL /// Toplevel // The result is optional even if R is not. ! <Any R> R[] f(int size) = new R[size]; /// PASS /// Toplevel ! <Any R> R[] myReverse(R[] x) = superfill(new R[x.length], int i => x[x.length - 1 - i]); ! <Any T, Any U | U <: T> U[] superfill(T[] array, int->U value) { for (int i = 0; i < array.length; i++) --- 7,24 ---- /// PASS /// Toplevel ! <T> T id(T x) = x; ! <Z> void f(Z[] a) { id(new Z[1]); } /// FAIL /// Toplevel // The result is optional even if R is not. ! <R> R[] f(int size) = new R[size]; /// PASS /// Toplevel ! <R> R[] myReverse(R[] x) = superfill(new R[x.length], int i => x[x.length - 1 - i]); ! <T, U | U <: T> U[] superfill(T[] array, int->U value) { for (int i = 0; i < array.length; i++) Index: polymorphism.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/polymorphism.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** polymorphism.testsuite 14 Mar 2003 19:44:50 -0000 1.4 --- polymorphism.testsuite 13 Oct 2004 18:28:51 -0000 1.5 *************** *** 9,22 **** } ! <Any C, Any R | C <: Ref<R> > void accessRef (Ref<R> r) {} /// FAIL /// COMMENT Currently we allow only <C T> if C is a type constructor. /// Toplevel ! <Any T, T U> void f(); /// PASS /// Toplevel ! <Any T> int m(T); m(x) = 0; m(c@Collection) = c.size(); --- 9,22 ---- } ! <C, R | C <: Ref<R> > void accessRef (Ref<R> r) {} /// FAIL /// COMMENT Currently we allow only <C T> if C is a type constructor. /// Toplevel ! <T, T U> void f(); /// PASS /// Toplevel ! <T> int m(T); m(x) = 0; m(c@Collection) = c.size(); Index: null.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/null.testsuite,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** null.testsuite 31 Aug 2003 00:32:56 -0000 1.8 --- null.testsuite 13 Oct 2004 18:28:51 -0000 1.9 *************** *** 2,8 **** /// PASS /// toplevel ! <Any T> void nonnull(!T); ! nonnull(x@String) {} nonnull(x) {} --- 2,8 ---- /// PASS /// toplevel ! <T> void nonnull(!T); ! nonnull(String x) {} nonnull(x) {} |