Update of /cvsroot/nice/Nice/testsuite/compiler/typing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30198/testsuite/compiler/typing
Modified Files:
inference.testsuite
Log Message:
Save the constraint when there are any soft variables (which happens when
in existential mode).
Index: inference.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/inference.testsuite,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** inference.testsuite 24 Mar 2004 23:44:24 -0000 1.6
--- inference.testsuite 26 Mar 2004 16:15:38 -0000 1.7
***************
*** 167,168 ****
--- 167,200 ----
/// Toplevel
<T,U | U <: T> (List<T>,List<U>) foo(List<U> x) = (new ArrayList(x), x);
+
+ /// PASS
+ // bug #923443
+ byte n = 10;
+ let L1 = new LinkedList();
+ L1.add(n);
+
+ foo(L1[0]);
+
+ /// Toplevel
+ void foo(byte) {}
+ void foo(boolean) {}
+
+ /// PASS
+ // self-contained test inspired by #923443
+ let a = new A();
+
+ int i = 0;
+ poly(a, i);
+
+ foo(a);
+
+ /// Toplevel
+ void foo(A<int>) {}
+ void foo(A<boolean>) { assert false; }
+
+ /// PASS
+ let testmap = new HashMap();
+ for(i : 1..10)
+ testmap[i] = i.toString();
+ for(i : testmap.keySet())
+ println(i + " => " + testmap[i]);
|