Nice/testsuite/compiler/overloading fields.testsuite,1.4,1.5
Daniel Bonniot <[email protected]> Mon, 04 Apr 2005 15:56:33 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/testsuite/compiler/overloading
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13892/testsuite/compiler/overloading
Modified Files:
fields.testsuite
Log Message:
Fix overloading resolution for instance fields when all field accesses are
also be valid candidates.
Index: fields.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/overloading/fields.testsuite,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fields.testsuite 1 Apr 2005 15:07:54 -0000 1.4
--- fields.testsuite 4 Apr 2005 15:56:30 -0000 1.5
***************
*** 1,14 ****
/// COMMENT Special handling of class fields during overloading resolution.
- /// PASS bug
- /// Toplevel
- class Bar {
- Map<String,String> db;
- }
- class Foo {
- Map<String,String> db;
- Object dbLock() = db;
- }
-
/// PASS
let i = x;
--- 1,4 ----
***************
*** 119,120 ****
--- 109,137 ----
int foo() = 42;
+
+ /// PASS
+ let f = new Foo(db: "aaa");
+ assert f.dbLock().equals("aaa");
+ /// Toplevel
+ class Bar {
+ String db;
+ }
+ class Foo {
+ String db;
+ Object dbLock() = db;
+ }
+
+ /// PASS
+ let f = new Foo(db: "aaa");
+ assert f.dbLock().equals("aaa");
+ /// Toplevel
+ class Bar {
+ String db;
+ }
+ class Foo {
+ String db;
+ Object dbLock() {
+ let res = db;
+ return res;
+ }
+ }
-------------------------------------------------------
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