[Nice-commit] Nice/testsuite/compiler/typing instanceof.testsuite,1.3,1.4
Brought to you by:
bonniot
From: <ar...@us...> - 2003-10-05 23:23:19
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv16560/F:/nice/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: Testcases where an assignment in a instanceof branch should fail at compile time. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** instanceof.testsuite 28 Sep 2003 17:16:33 -0000 1.3 --- instanceof.testsuite 5 Oct 2003 23:23:13 -0000 1.4 *************** *** 91,92 **** --- 91,107 ---- break; } + + /// FAIL bug + B b = new B(); + if (b instanceof A) + b = new A(); + + /// FAIL bug + Y y = new D(); + if (y instanceof X) + y = new C(); + /// Toplevel + interface X {} + interface Y {} + class C implements X {} + class D implements X,Y {} |