Nice/testsuite/compiler/visibility/expressions public.testsuite,1.1,1.2
Daniel Bonniot <[email protected]>
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/testsuite/compiler/visibility/expressions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23334/testsuite/compiler/visibility/expressions
Modified Files:
public.testsuite
Log Message:
Each module (and package) now has its own Scope.
All symbols are still public, but only visible to packages that import their
englobing package.
Index: public.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/visibility/expressions/public.testsuite,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** public.testsuite 6 Mar 2005 13:12:46 -0000 1.1
--- public.testsuite 11 Mar 2005 17:35:45 -0000 1.2
***************
*** 1,3 ****
! /// FAIL bug
/// package a
/// Toplevel
--- 1,3 ----
! /// FAIL
/// package a
/// Toplevel
***************
*** 30,31 ****
--- 30,58 ----
/// package d import c,b
{}
+
+ /// PASS
+ // Check that methods in the package do not hide methods with the same name
+ // in imported packages.
+ /// package a
+ /// Toplevel
+ class A<T> { public T[] elements; }
+ /// package b import a
+ new B(elements: new int[0]).size();
+ /// Toplevel
+ class B<T> extends A<T> {
+ int size() = this.elements.size();
+ }
+
+
+ /// PASS
+ // Check that methods in the package do not hide methods with the same name
+ // in imported packages.
+ /// package a
+ /// Toplevel
+ class A {}
+ public void foo(A a) {}
+
+ /// package b import a
+ /// Toplevel
+ class X { A a; }
+ void foo(X x) = foo(x.a);
-------------------------------------------------------
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