Update of /cvsroot/nice/Nice/testsuite/compiler
In directory sc8-pr-cvs1:/tmp/cvs-serv17402/testsuite/compiler
Modified Files:
globalVariables.testsuite
Log Message:
Check global variable initialization value for captured variables
(partly fixes #686142).
Index: globalVariables.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/globalVariables.testsuite,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** globalVariables.testsuite 10 Feb 2003 10:53:04 -0000 1.6
--- globalVariables.testsuite 19 Feb 2003 14:16:11 -0000 1.7
***************
*** 42,45 ****
--- 42,58 ----
/// PASS
+ /// Toplevel
+ // Checks proper closures inside initialization expressions.
+ var Map<String,String> classMap = (()=> {
+ Map<String,String> classMap' = new HashMap();
+ [("int", "java.lang.Integer")].foreach((String,String) pair => {
+ (String key, String value) = pair;
+ classMap'.put(key, value);
+ });
+ return classMap';
+ })();
+
+
+ /// PASS
/* Modifying a global var. */
x = 1;
|