Nice/testsuite/compiler/typing object.testsuite,1.5,1.6

Daniel Bonniot <[email protected]> Fri, 17 Jun 2005 14:14:10 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
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) {}



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click