Nice/testsuite/compiler/native retyping.testsuite,1.3,1.4
Daniel Bonniot <[email protected]> Sun, 13 Mar 2005 11:38:19 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/testsuite/compiler/native
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23417/testsuite/compiler/native
Modified Files:
retyping.testsuite
Log Message:
Add retypings in the global java scope, so that packages not directly importing
the retyping package do not fail to see the retyped method completely.
Index: retyping.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/native/retyping.testsuite,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** retyping.testsuite 2 Sep 2003 23:14:14 -0000 1.3
--- retyping.testsuite 13 Mar 2005 11:38:17 -0000 1.4
***************
*** 41,42 ****
--- 41,67 ----
putValue(editPart, model) {}
}
+
+
+ /// PASS
+ /// package lib
+ /// Toplevel
+ public class A
+ {
+ public void foo() {}
+ }
+
+ /// package a
+ // We don't import the 'lib' package, so as to see it as a "native" package
+ /// Toplevel
+ class A<T> = native lib.A;
+ <T> A<T> A() = native new lib.A();
+ <T> void foo(A<T>) = native void lib.A.foo();
+
+ /// package b import a
+ {}
+
+ /// package c import b
+ // It's questionable whether the retyped version of foo or the raw one
+ // is visible here. In both cases this testcase should be.
+ // Failing with "foo is not declared" is not OK.
+ new lib.A().foo();
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click