Nice/testsuite/compiler/classes fields.testsuite,1.19,1.20

Daniel Bonniot <[email protected]>
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/testsuite/compiler/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28532/testsuite/compiler/classes

Modified Files:
	fields.testsuite 
Log Message:
More testcases for clashes between methods and automatic getters and setters.


Index: fields.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/fields.testsuite,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** fields.testsuite	15 Jan 2005 21:05:55 -0000	1.19
--- fields.testsuite	1 Mar 2005 17:40:31 -0000	1.20
***************
*** 195,196 ****
--- 195,260 ----
    String foo = "";
  }
+ 
+ /// PASS
+   let m = new B("file", name: 0);
+   /// Toplevel
+ class A extends java.io.File
+ {
+ }
+ class B extends A
+ {
+   int name;
+ 
+   getName() = "";
+ }
+ 
+ String foo(B m) = m.getName();
+ 
+ /// PASS
+   /// package a
+   let f = new FunctionClass(x: 0);
+   /// Toplevel
+ class FunctionClass
+ {
+   int x;
+   void setX(int value) { this.x = 2*value; }
+ }
+   /// package b import a
+   let f = new FunctionClass(x: 0);
+   f.setX(2);
+   assert f.x == 4;
+ 
+ /// PASS
+   assert foo().equals("bar") : foo();
+   /// Toplevel
+ class MyFile extends java.io.File
+ {
+   int name;
+ }
+ 
+ String foo()
+ {
+   java.io.File f = new MyFile("foo", name: 0);
+   String s = f.getName();
+   return s;
+ }
+ getName(MyFile this) = "bar";
+ 
+ /// PASS
+   /// package a
+   /// Toplevel
+ class MyFile extends java.io.File
+ {
+   int name;
+ }
+ 
+ String foo()
+ {
+   java.io.File f = new MyFile("foo", name: 0);
+   String s = f.getName();
+   return s;
+ }
+ getName(MyFile this) = "bar";
+   /// package b import a
+   assert foo().equals("bar") : foo();
+   /// Toplevel



-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.