digitalmars.D.bugs - ? regression (class constructor/private)
- Thomas =?UTF-8?B?S8O8aG5l?= (4/4) Nov 09 2004 http:///svn.kuehne.cn/dstress/www/dstress.html#constructor_04
- Buchan (8/12) Nov 09 2004 lose the 3rd /
- Thomas =?UTF-8?B?S8O8aG5l?= (9/13) Nov 09 2004 yeah...
- Walter (3/6) Nov 09 2004 What's the problem? The code on the web page is incomplete.
- Thomas =?UTF-8?B?S8O8aG5l?= (6/15) Nov 09 2004 It's one of the few multi file testcases:
- Walter (3/17) Nov 11 2004 I think the problem is that the constructor is private.
- Sean Kelly (12/13) Nov 11 2004 That's what's causing the error, but I think it's still a compiler bug. ...
- Walter (1/1) Nov 11 2004 No problem, I found and fixed it. Thanks, -Walter
- Thomas =?UTF-8?B?S8O8aG5l?= (18/23) Nov 11 2004 The import behavior is expected. Remember everything in one source file ...
- Sean Kelly (7/18) Nov 11 2004 I don't have a problem with an auto-generated ctor, but it should be pub...
http:///svn.kuehne.cn/dstress/www/dstress.html#constructor_04 I am not sure if this is a bug or an newly introduced feature. See also the gnu.D messages on "scope of auto generated ctor". Thomas
Nov 09 2004
On Tue, 09 Nov 2004 11:06:06 +0100, Thomas Kühne <thomas-dloop kuehne.cn> wrote:http:///svn.kuehne.cn/dstress/www/dstress.html#constructor_04 I am not sure if this is a bug or an newly introduced feature. See also the gnu.D messages on "scope of auto generated ctor". Thomaslose the 3rd / (http://svn.kuehne.cn/dstress/www/dstress.html#constructor_04) how can you get the addon? (preferably by browser... dont want to have to learn SVN yet) -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 09 2004
Buchan schrieb am Dienstag, 9. November 2004 15:34:lose the 3rd / (http://svn.kuehne.cn/dstress/www/dstress.html#constructor_04)yeah...how can you get the addon? (preferably by browser... dont want to have to learn SVN yet)module dstress.addon.constructor_04_A; -> http://svn.kuehne.cn/dstress/addon/constructor_04_A.d You get the idea, don't you ;) You are working on a Window box? Get a nice Explorer extendsion: http://tortoisesvn.tigris.org/ Thomas
Nov 09 2004
"Thomas Kühne" <thomas-dloop kuehne.cn> wrote in message news:cmq4jp$49v$1 digitaldaemon.com...http:///svn.kuehne.cn/dstress/www/dstress.html#constructor_04 I am not sure if this is a bug or an newly introduced feature. See also the gnu.D messages on "scope of auto generated ctor".What's the problem? The code on the web page is incomplete.
Nov 09 2004
Walter schrieb am Dienstag, 9. November 2004 20:26:"Thomas Kühne" <thomas-dloop kuehne.cn> wrote in message news:cmq4jp$49v$1 digitaldaemon.com...It's one of the few multi file testcases: http://svn.kuehne.cn/dstress/run/constructor_04.d http://svn.kuehne.cn/dstress/addon/constructor_04_A.d See the note in the dstress.addon.constructor_04_A module. Thomashttp:///svn.kuehne.cn/dstress/www/dstress.html#constructor_04 I am not sure if this is a bug or an newly introduced feature. See also the gnu.D messages on "scope of auto generated ctor".What's the problem? The code on the web page is incomplete.
Nov 09 2004
"Thomas Kühne" <thomas-dloop kuehne.cn> wrote in message news:cmr6cc$1o2d$1 digitaldaemon.com...Walter schrieb am Dienstag, 9. November 2004 20:26:I think the problem is that the constructor is private."Thomas Kühne" <thomas-dloop kuehne.cn> wrote in message news:cmq4jp$49v$1 digitaldaemon.com...It's one of the few multi file testcases: http://svn.kuehne.cn/dstress/run/constructor_04.d http://svn.kuehne.cn/dstress/addon/constructor_04_A.d See the note in the dstress.addon.constructor_04_A module.http:///svn.kuehne.cn/dstress/www/dstress.html#constructor_04 I am not sure if this is a bug or an newly introduced feature. See also the gnu.D messages on "scope of auto generated ctor".What's the problem? The code on the web page is incomplete.
Nov 11 2004
In article <cn0cp5$if9$2 digitaldaemon.com>, Walter says...I think the problem is that the constructor is private.That's what's causing the error, but I think it's still a compiler bug. If you move the class definitions in constructor_04_A into constructor_04 then the code compiles just fine. Also, if you change the definition of Derived to this: } then the code compiles fine as well. The problem seems to have something to do with import. Sean
Nov 11 2004
No problem, I found and fixed it. Thanks, -Walter
Nov 11 2004
Sean Kelly schrieb am Donnerstag, 11. November 2004 20:55: [snip]The import behavior is expected. Remember everything in one source file is "friendly" to eachother. In my view the problem is that a ctor is silently generated in the Derived class. If it needs to be created I'd expect the same access rights as for the super(Base class) constructor. The remaining problem is of course the module member ship and it's consequences. Sample: Base is in module A with a private ctor. Derived is in module B and has no explicit ctor. Is Derived's silent ctor accessible from module A? Is Derived's silent ctor accessible from module B? Thomas PS: Sean, I've added your sample. http://svn.kuehne.cn/dstress/run/constructor_06.d http://svn.kuehne.cn/dstress/addon/constructor_06_A.dI think the problem is that the constructor is private.That's what's causing the error, but I think it's still a compiler bug. If you move the class definitions in constructor_04_A into constructor_04 then the code compiles just fine.
Nov 11 2004
In article <cn0i8e$rmj$1 digitaldaemon.com>, Thomas =?UTF-8?B?S8O8aG5l?= says...Sean Kelly schrieb am Donnerstag, 11. November 2004 20:55: [snip]Oops! I'd forgotten.The import behavior is expected. Remember everything in one source file is "friendly" to eachother.I think the problem is that the constructor is private.That's what's causing the error, but I think it's still a compiler bug. If you move the class definitions in constructor_04_A into constructor_04 then the code compiles just fine.In my view the problem is that a ctor is silently generated in the Derived class.I don't have a problem with an auto-generated ctor, but it should be public by default. If the programmer wants his class to not be publically contructible then he should put a default contructor in private scope. But as Walter has already fixed this, I suppose we can test the new behavior in .107 :) Sean
Nov 11 2004