[Nice-commit] Nice/testsuite/compiler/classes typeParameters.testsuite,1.16,1.17
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-06-16 10:01:24
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32734/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: Handle type variables that are used simultaneously with and without nullness markers (implements RFE #738496). Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** typeParameters.testsuite 4 Mar 2004 15:48:20 -0000 1.16 --- typeParameters.testsuite 16 Jun 2004 10:00:33 -0000 1.17 *************** *** 301,302 **** --- 301,359 ---- <String S> class B<S> extends A<S> {} + + /// PASS + A<String> a; + a = new A(x: null); + a = new A(x: ""); + a.x = null; + a.x = ""; + ?String s = a.x; + + /// Toplevel + class A<T> + { + ?T x; + } + + /// FAIL + A<String> a = new A(x: null); + String s = a.x; + + /// Toplevel + class A<T> + { + ?T x; + } + + /// PASS + A<?String> a; + a = new A(x: ""); + a.x = ""; + String s = a.x; + + /// Toplevel + class A<T> + { + !T x; + } + + /// FAIL + A<String> a = new A(x: null); + + /// Toplevel + class A<T> + { + !T x; + } + + /// PASS + A<int> a1 = new A(a: 2); + ?int i = a1.get(2); + /// Toplevel + class A<T> { + T a; + + ?T get(int i); + get(1) = a; + get(i) = null; + } |