Update of /cvsroot/nice/Nice/testsuite/compiler/typing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22896/testsuite/compiler/typing
Modified Files:
object.testsuite
Log Message:
Do not allow a soft type variable to become greater than Object if it is
already constrained to be smaller than another type, as that is obviously
unsafe.
Index: object.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/object.testsuite,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** object.testsuite 12 Mar 2005 15:06:17 -0000 1.5
--- object.testsuite 17 Jun 2005 14:14:07 -0000 1.6
***************
*** 79,80 ****
--- 79,98 ----
<T> T foo(T x) = x;
foo(#String s) = /*/// FAIL HERE*/ o;
+
+ /// FAIL
+ A<int> a = new A(x: 0);
+ /*/// FAIL HERE */ foo(a, new A(x: new Object()));
+ int x = a.x;
+ /// Toplevel
+ class A<T> { T x; }
+ <T> void foo(A<T> a1, A<T> a2) { a1.x = a2.x; }
+
+ /// FAIL
+ let (Object[], int->?Object)->void /*/// FAIL HERE */ f = foo;
+ /// Toplevel
+ <T> void foo(List<T>,T) {}
+
+ /// FAIL
+ let (?Object[], (int,int))->void /*/// FAIL HERE */ f = foo;
+ /// Toplevel
+ <T> void foo(List<T>,T) {}
|