Update of /cvsroot/nice/Nice/testsuite/compiler/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv25333/testsuite/compiler/classes
Modified Files:
typeParameters.testsuite
Log Message:
When a default value is used in a method call, use the declared type of that
parameter to compute the resulting type.
Index: typeParameters.testsuite
===================================================================
RCS file:
/cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** typeParameters.testsuite 25 Jul 2003 16:59:23 -0000 1.12
--- typeParameters.testsuite 26 Jul 2003 22:29:47 -0000 1.13
***************
*** 224,225 ****
--- 224,265 ----
Impl<int> w = new Impl();
}
+
+ /// PASS
+ /// Toplevel
+ class Bar<U> {
+ U e;
+ }
+ class II<T> {
+ private Bar<T> lp;
+ void foo(T element) {
+ this.lp = new Bar(e: element);
+ }
+ }
+
+ /// PASS
+ /// Toplevel
+ interface A<T> {}
+ interface C<T> {}
+ class CImpl<T> extends Impl<T> implements C<T> {}
+ class Impl<T> {
+ T -> int bar = T t1 => 0;
+ }
+ class Foo<T> {
+ Impl<int> w = new Impl(); // works
+ Impl<A<int>> s = new Impl(); // works
+ C<A<T>> t = new CImpl(); // does not work!
+ }
+
+ /// PASS
+ new B();
+ /// Toplevel
+ class A<T> { T->T f = T x => { T tmp = x; return tmp; }; }
+ class B<T> extends A<T> {}
+
+ /// PASS
+ /// Toplevel
+ class Foo<T> {
+ T t;
+
+ { t = t; this.t = t; t = this.t; this.t = this.t; }
+ }
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
|