[Nice-commit] Nice/testsuite/compiler/overloading specificity.testsuite,1.4,1.5 complex.testsuite,1.
Brought to you by:
bonniot
From: <bo...@us...> - 2004-02-28 14:33:13
|
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16026/testsuite/compiler/overloading Modified Files: specificity.testsuite complex.testsuite Log Message: Methods now specialize other methods with a larger domain (ignoring subtyping on non-dispatchable types like primitive and tuple types). Covariance of the return type is not yet checked, and there is not yet a way to explicitely declare that a method is a specialization. Index: specificity.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/specificity.testsuite,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** specificity.testsuite 17 Jan 2004 20:59:51 -0000 1.4 --- specificity.testsuite 28 Feb 2004 14:23:41 -0000 1.5 *************** *** 51,56 **** void foo(A); void foo(B); ! foo(@B(A)) {} ! foo(@B(B)) {} /// PASS --- 51,55 ---- void foo(A); void foo(B); ! foo(@B) {} /// PASS *************** *** 71,78 **** void foo(B, A); void foo(B, B); ! foo(@B(A) ,@B(A)) {} ! foo(@B(A) ,@B(B)) {} ! foo(@B(B) ,@B(A)) {} ! foo(@B(B) ,@B(B)) {} /// FAIL --- 70,74 ---- void foo(B, A); void foo(B, B); ! foo(@B,@B) {} /// FAIL *************** *** 85,89 **** foo(@B(B)) {} ! /// FAIL /// Toplevel abstract class A {} --- 81,85 ---- foo(@B(B)) {} ! /// PASS /// Toplevel abstract class A {} *************** *** 92,97 **** void foo(B ,Number); void foo(B ,Integer); ! foo(@B(A) ,s) {} ! foo(@B(B) ,s) {} /// PASS --- 88,94 ---- void foo(B ,Number); void foo(B ,Integer); ! foo(@B, s@String) {} ! foo(@B, s@Number) {} ! foo(@B, s@Integer) {} /// PASS Index: complex.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/complex.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** complex.testsuite 5 May 2003 16:39:44 -0000 1.2 --- complex.testsuite 28 Feb 2004 14:23:41 -0000 1.3 *************** *** 8,15 **** String[] sa1 = ["xyz"]; eq2(sa1, [null]); /// Toplevel <T,U,V | U <: T, V <: T> boolean eq2(U[] u, V[] v) = false; ! <Any T> boolean eq2(!T,!T) = true; ! <Any T> boolean eq2(?T, ?T) = false; /// PASS --- 8,19 ---- String[] sa1 = ["xyz"]; eq2(sa1, [null]); + + ?String s = ""; + assert eq2(s, s); + assert !eq2(null, null); /// Toplevel <T,U,V | U <: T, V <: T> boolean eq2(U[] u, V[] v) = false; ! <T> boolean eq2(!T,!T) = true; ! <T> boolean eq2(?T,?T) = false; /// PASS *************** *** 19,22 **** /// Toplevel <T,U> boolean test(List<T> , List<U>) = false; ! <Any T> boolean test(!T,!T) = true; ! <Any T> boolean test(?T, ?T) = false; --- 23,26 ---- /// Toplevel <T,U> boolean test(List<T> , List<U>) = false; ! <T> boolean test(!T,!T) = true; ! <T> boolean test(?T, ?T) = false; |