digitalmars.D.bugs - Method overloading bug
- dickl (24/24) Jun 09 2004 The compiler complains that the method (void test(bool i) ) is not
- Ant (6/10) Jun 09 2004 look at mine also:
- Stewart Gordon (12/17) Jun 14 2004 Yes, there seems to be a root cause to the lot: DMD is attaching
The compiler complains that the method (void test(bool i) ) is not accessable even though it is supposed to be public: M:\dmd>dmd test.d testclass.d test.d(7): class TestClass member test is not accessible file1: testclass.d module testclass; class TestClass { private: bool k=false; bool test(){return k;} public: this(){} void test(bool b){k=b;} } ----------------------- file2: test.d private import testclass; int main() { TestClass K=new TestClass K.test(true); //<== method should be accessable ! return 0; }
Jun 09 2004
In article <ca7oiv$eeo$1 digitaldaemon.com>, dickl says...The compiler complains that the method (void test(bool i) ) is not accessable even though it is supposed to be public: M:\dmd>dmd test.d testclass.d test.d(7): class TestClass member test is not accessiblelook at mine also: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/420 looks like the overloading match is a mess. this might not be a new bug. Ant
Jun 09 2004
Ant wrote: <snip>look at mine also: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/420 looks like the overloading match is a mess. this might not be a new bug.Yes, there seems to be a root cause to the lot: DMD is attaching attributes to names instead of individual members, and so the attributes of the first one are the attributes of the lot. A while back I reported it among various problems with deprecation: http://www.digitalmars.com/drn-bin/wwwnews?D/26128 Stewart. -- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.
Jun 14 2004