[Nice-commit] Nice/testsuite/compiler/typing instanceof.testsuite,NONE,1.1
Brought to you by:
bonniot
From: <bo...@us...> - 2003-08-27 09:33:49
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv4636/testsuite/compiler/typing Added Files: instanceof.testsuite Log Message: Dynamic type inference for instanceof. --- NEW FILE: instanceof.testsuite --- /// global class A{} class B extends A { int life = 42; } /// PASS A a; a = new B(); if (a instanceof B) assert a.life == 42; else assert false; /// FAIL A a; a = new A(); if (a instanceof B) assert false; else assert a.life == 42; /// FAIL A a; a = new B(); if (a instanceof B) ; assert a.life == 42; |