[Nice-commit] Nice/testsuite/compiler/typing inference.testsuite,1.7,1.8
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-04-22 10:09:38
|
Update of /cvsroot/nice/Nice/testsuite/compiler/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8357/testsuite/compiler/typing Modified Files: inference.testsuite Log Message: Disable refreeing of former free variables after failed overloading, since it triggers a bug and does not seem to help in any known case. Index: inference.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/inference.testsuite,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** inference.testsuite 26 Mar 2004 16:15:38 -0000 1.7 --- inference.testsuite 22 Apr 2004 10:09:27 -0000 1.8 *************** *** 199,200 **** --- 199,245 ---- for(i : testmap.keySet()) println(i + " => " + testmap[i]); + + /// PASS + // bug #923429 + var n = 1; + let nKeys = 10000; + + let table1 = new HashMap(nKeys); + let table2 = new HashMap(); + for (int i = 0; i <= nKeys; i++) + table1["foo_" + i] = new Cell(value: i); + + String key; + int v1; + ?Cell c2; + + while (n-- > 0) + for (each : table1.entrySet) { + key = each.getKey; + v1 = each.getValue.value; + + if ( (c2 = table2[key]) != null) + c2.value += v1; + else + table2[key] = new Cell(value: v1); //HERE + } + /// Toplevel + class Cell { int value; } + toString(Cell c) = c.value.toString; + + /// PASS + // bug #923429 simplified + let table1 = new HashMap(); + let table2 = new HashMap(); + + ?Cell c2; + + for (each : table1.entrySet) + { + let key = each.getKey; + c2 = table2[key]; + table2[key] = new Cell(value: each.getValue.value); + } + /// Toplevel + + class Cell { int value; } |