digitalmars.D.bugs - 0.126: New Struct Error
- John Reimer (25/25) Jun 09 2005 The code (much reduced from original):
- Regan Heath (4/23) Jun 09 2005 Adding 'static' to create seems to fix it. eg. "static Entry* create()" ...
- John Reimer (3/8) Jun 09 2005 Thanks. I'm curious to know why this changes in the recent version.
- Sean Kelly (5/10) Jun 09 2005 The error message stinks, but you should not be able to call a nonstatic...
- John Reimer (5/23) Jun 09 2005 Thanks. That makes sense. I was wondering if structs had an implicit
- Walter (4/6) Jun 14 2005 No. You'd just get passed the wrong 'this'. If you accessed a member, a ...
- Walter (4/11) Jun 14 2005 Because it now checks for that particular mistake. Before, it would pass...
- Uwe Salomon (3/23) Jun 09 2005 Ciao
The code (much reduced from original): Produces this error message (courtesy of dmd 0.126 on linux): test.d(16): this for create needs to be type Entry not type test.Container Can anybody decipher that message? That's verbatum! I'm not sure why it's not working either. This compiled on previous versions. -JJR
Jun 09 2005
On Thu, 09 Jun 2005 04:55:25 -0700, John Reimer <brk_6502 yahoo.com> wrote:Adding 'static' to create seems to fix it. eg. "static Entry* create()" etc. Regan
Jun 09 2005
Regan Heath wrote:Adding 'static' to create seems to fix it. eg. "static Entry* create()" etc. ReganThanks. I'm curious to know why this changes in the recent version. -JJR
Jun 09 2005
In article <d8a3e5$23gj$1 digitaldaemon.com>, John Reimer says...Regan Heath wrote:The error message stinks, but you should not be able to call a nonstatic method on a type unless it's through an instance of that type. I'm surprised that code ever worked. SeanAdding 'static' to create seems to fix it. eg. "static Entry* create()" etc.Thanks. I'm curious to know why this changes in the recent version.
Jun 09 2005
Sean Kelly wrote:In article <d8a3e5$23gj$1 digitaldaemon.com>, John Reimer says...Thanks. That makes sense. I was wondering if structs had an implicit static attribute on there methods in past versions. I haven't used structs much. With classes, I can see the necessity of using static. -JJRRegan Heath wrote:The error message stinks, but you should not be able to call a nonstatic method on a type unless it's through an instance of that type. I'm surprised that code ever worked. SeanAdding 'static' to create seems to fix it. eg. "static Entry* create()" etc.Thanks. I'm curious to know why this changes in the recent version.
Jun 09 2005
"John Reimer" <brk_6502 yahoo.com> wrote in message news:d8a5pn$25s9$1 digitaldaemon.com...Thanks. That makes sense. I was wondering if structs had an implicit static attribute on there methods in past versions.No. You'd just get passed the wrong 'this'. If you accessed a member, a mess would happen.
Jun 14 2005
"John Reimer" <brk_6502 yahoo.com> wrote in message news:d8a3e5$23gj$1 digitaldaemon.com...Regan Heath wrote:Because it now checks for that particular mistake. Before, it would pass the wrong 'this' pointer to Entry.create().Adding 'static' to create seems to fix it. eg. "static Entry* create()" etc. ReganThanks. I'm curious to know why this changes in the recent version.
Jun 14 2005
The code (much reduced from original):Insert a "static" here.Ciao uwe
Jun 09 2005