Update of /cvsroot/nice/Nice/testsuite/compiler/methods
In directory sc8-pr-cvs1:/tmp/cvs-serv32150/testsuite/compiler/methods
Modified Files:
constrained.testsuite
Log Message:
Report an error when a method implementation binds type parameters that are
not in the method declaration.
Index: constrained.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/constrained.testsuite,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** constrained.testsuite 18 Jun 2003 18:12:46 -0000 1.4
--- constrained.testsuite 11 Sep 2003 21:07:01 -0000 1.5
***************
*** 74,75 ****
--- 74,89 ----
/*/// FAIL HERE */ foo(@X){}
//@X is not in the domain of foo
+
+ /// FAIL
+ /// Toplevel
+ class A
+ {
+ void f();
+ f() {}
+ }
+
+ class B extends A
+ {
+ // Use type parameter that does not exist in the declaration
+ <U> f() {}
+ }
|