[Nice-commit] Nice/testsuite/compiler/methods overriding.testsuite,1.6,1.7
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-06-17 10:41:21
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26637/testsuite/compiler/methods Modified Files: overriding.testsuite Log Message: Explicitly mark which methods are overrides in compiled packages, and use that information to speed up the loading of compiled packages. Index: overriding.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/overriding.testsuite,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** overriding.testsuite 17 Mar 2004 00:36:45 -0000 1.6 --- overriding.testsuite 17 Jun 2004 10:41:13 -0000 1.7 *************** *** 72,75 **** --- 72,112 ---- override boolean foo(B); foo(B x) = true; + /// PASS bug + // Should we allow a more general method to be declared in a later package + // and still discover overriding? + /// package a + /// Toplevel + class A {} + class B extends A {} + + boolean foo(B,B); foo(B x, B y) = true; + /// package b import a + B b = new B(); + assert foo(b,b); + + A a = b; + assert foo(a,a); + /// TOPLEVEL + boolean foo(A,A) = false; + + /// PASS + /// package a + /// Toplevel + class A {} + class B extends A {} + + boolean foo(A,A) = false; + boolean foo(B,B); foo(B x, B y) = true; + /// package b import a + C c = new C(); + B b = c; + A a = c; + assert !foo(a,a); + assert !foo(b,b); + assert !foo(c,c); + /// TOPLEVEL + class C extends B {} + foo(C x, C y) = false; + /// PASS A a = new C(); |