Thread overview | |||||
---|---|---|---|---|---|
|
June 09, 2004 Method overloading bug | ||||
---|---|---|---|---|
| ||||
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; } |
June 09, 2004 Re: Method overloading bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to dickl | 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 accessible 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. Ant |
June 14, 2004 Re: Method overloading bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | 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. |
Copyright © 1999-2021 by the D Language Foundation