[Nice-commit] Nice/testsuite/compiler/typing instanceof.testsuite,1.17,1.18
Brought to you by:
bonniot
From: <bo...@us...> - 2003-11-25 10:42:56
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1:/tmp/cvs-serv11222/testsuite/compiler/typing Modified Files: instanceof.testsuite Log Message: Arguments of known pure higher-order functions capture variables can be typechecked in the current dynamic type environment, since they do not escape the call. Index: instanceof.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/instanceof.testsuite,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** instanceof.testsuite 25 Nov 2003 10:31:01 -0000 1.17 --- instanceof.testsuite 25 Nov 2003 10:41:10 -0000 1.18 *************** *** 312,313 **** --- 312,321 ---- assert x.life == 42; } + + /// PASS + // We know that foreach does not let its arguments escape. + A x = new A(); + if (x instanceof B) + new LinkedList().foreach(A arg => { + assert x.life == 42; + }); |