[Nice-commit] Nice/testsuite/compiler/overloading fields.testsuite,1.4,1.5
Brought to you by:
bonniot
|
From: Daniel B. <bo...@us...> - 2005-04-04 15:56:40
|
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; + } + } |