Nice/testsuite/compiler/typing wildcards.testsuite,1.5,1.6
Daniel Bonniot <[email protected]> Sat, 18 Jun 2005 09:58:41 +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-serv29740/testsuite/compiler/typing
Modified Files:
wildcards.testsuite
Log Message:
'?' is not a subtype of Object, only of ?Object.
Index: wildcards.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/wildcards.testsuite,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** wildcards.testsuite 9 Jun 2005 14:11:36 -0000 1.5
--- wildcards.testsuite 18 Jun 2005 09:58:39 -0000 1.6
***************
*** 40,44 ****
/// Toplevel
class A<T0> { T0 x; }
! Object foo(A<?> a) = a.x;
/// FAIL
--- 40,44 ----
/// Toplevel
class A<T0> { T0 x; }
! ?Object foo(A<?> a) = a.x;
/// FAIL
***************
*** 144,149 ****
A<?> a = new A(x: 0);
let x = a.x;
! Object o = foo(x);
/// Toplevel
class A<T> { T x; }
<T0> T0 foo(T0 x) = x;
--- 144,168 ----
A<?> a = new A(x: 0);
let x = a.x;
! ?Object o = foo(x);
/// Toplevel
class A<T> { T x; }
<T0> T0 foo(T0 x) = x;
+
+
+ /// FAIL
+ ?Object[] s0 = [null];
+ Array<?> s = s0;
+ Object /*/// FAIL HERE */ o = s[0];
+ o.toString();
+
+ /// FAIL
+ Set<?Object> s0 = new TreeSet();
+ s0.add(null);
+ Set<?> s = s0;
+ for (k : s)
+ {
+ Object /*/// FAIL HERE */ o = foo(k);
+ o.toString();
+ }
+ /// Toplevel
+ <T0> T0 foo(T0 x) = x;
-------------------------------------------------------
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