digitalmars.D.learn - Writing .di files duplicate storage
- simendsjo (17/17) Aug 08 2011 I'm writing here because I haven't been able to create a smaller example...
- Jonathan M Davis (2/23) Aug 08 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6360
- simendsjo (3/26) Aug 08 2011 Thanks. The annoying thing is that I have to manually modify the import
- Brad Roberts (5/9) Aug 08 2011 Could spend the time fixing dmd instead of working around the bug. I
- simendsjo (3/12) Aug 08 2011 You really would not like me poking around in the DMD source :)
- simendsjo (7/30) Aug 08 2011 Wow! That was strange... If you look at my original property, I'm
- simendsjo (2/33) Aug 08 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6454
- Steven Schveighoffer (6/38) Aug 08 2011 I don't think it's the @property, I think its the static.
- simendsjo (4/45) Aug 08 2011 Seems you are right. Having static on functions also works without
- bearophile (4/5) Aug 08 2011 Or a design oddity?
I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?
Aug 08 2011
On Monday 08 August 2011 09:42:15 simendsjo wrote:I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?http://d.puremagic.com/issues/show_bug.cgi?id=6360
Aug 08 2011
On 08.08.2011 09:47, Jonathan M Davis wrote:On Monday 08 August 2011 09:42:15 simendsjo wrote:Thanks. The annoying thing is that I have to manually modify the import library :|I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?http://d.puremagic.com/issues/show_bug.cgi?id=6360
Aug 08 2011
On Monday, August 08, 2011 12:54:00 AM, simendsjo wrote:On 08.08.2011 09:47, Jonathan M Davis wrote:Could spend the time fixing dmd instead of working around the bug. I can't guarantee it'll be actually easier to fix it at the source rather than massaging the output, but I do know that the long term result would be more useful. :)http://d.puremagic.com/issues/show_bug.cgi?id=6360Thanks. The annoying thing is that I have to manually modify the import library :|
Aug 08 2011
On 08.08.2011 09:57, Brad Roberts wrote:On Monday, August 08, 2011 12:54:00 AM, simendsjo wrote:You really would not like me poking around in the DMD source :) The little C++ I once knew is very rusty, and my compiler theory is eq 0On 08.08.2011 09:47, Jonathan M Davis wrote:Could spend the time fixing dmd instead of working around the bug. I can't guarantee it'll be actually easier to fix it at the source rather than massaging the output, but I do know that the long term result would be more useful. :)http://d.puremagic.com/issues/show_bug.cgi?id=6360Thanks. The annoying thing is that I have to manually modify the import library :|
Aug 08 2011
On 08.08.2011 09:47, Jonathan M Davis wrote:On Monday 08 August 2011 09:42:15 simendsjo wrote:Wow! That was strange... If you look at my original property, I'm missing the bool return type. I don't have auto or void as the return type either. Compiling this gives no warnings! If I add bool as return type, the duplicate property is dropped. Any idea why this even compiles? The documentation doesn't say anything about property automatically adding a return type.I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?http://d.puremagic.com/issues/show_bug.cgi?id=6360
Aug 08 2011
On 08.08.2011 10:01, simendsjo wrote:On 08.08.2011 09:47, Jonathan M Davis wrote:http://d.puremagic.com/issues/show_bug.cgi?id=6454On Monday 08 August 2011 09:42:15 simendsjo wrote:Wow! That was strange... If you look at my original property, I'm missing the bool return type. I don't have auto or void as the return type either. Compiling this gives no warnings! If I add bool as return type, the duplicate property is dropped. Any idea why this even compiles? The documentation doesn't say anything about property automatically adding a return type.I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?http://d.puremagic.com/issues/show_bug.cgi?id=6360
Aug 08 2011
On Mon, 08 Aug 2011 04:01:17 -0400, simendsjo <simendsjo gmail.com> wrote:On 08.08.2011 09:47, Jonathan M Davis wrote:I don't think it's the property, I think its the static. static generally implies auto, for example: static i = 1; will compile. -SteveOn Monday 08 August 2011 09:42:15 simendsjo wrote:Wow! That was strange... If you look at my original property, I'm missing the bool return type. I don't have auto or void as the return type either. Compiling this gives no warnings! If I add bool as return type, the duplicate property is dropped. Any idea why this even compiles? The documentation doesn't say anything about property automatically adding a return type.I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?http://d.puremagic.com/issues/show_bug.cgi?id=6360
Aug 08 2011
On 08.08.2011 15:33, Steven Schveighoffer wrote:On Mon, 08 Aug 2011 04:01:17 -0400, simendsjo <simendsjo gmail.com> wrote:Seems you are right. Having static on functions also works without specifying a return type.. Is this by design, or just an implementation oddity?On 08.08.2011 09:47, Jonathan M Davis wrote:I don't think it's the property, I think its the static. static generally implies auto, for example: static i = 1; will compile. -SteveOn Monday 08 August 2011 09:42:15 simendsjo wrote:Wow! That was strange... If you look at my original property, I'm missing the bool return type. I don't have auto or void as the return type either. Compiling this gives no warnings! If I add bool as return type, the duplicate property is dropped. Any idea why this even compiles? The documentation doesn't say anything about property automatically adding a return type.I'm writing here because I haven't been able to create a smaller example and I'm not sure what to search for in bugzilla. DMD adds a storage identifier twice when writing .di files. This is my code: /// static property isGUIThread() { return cast(bool)IsGUIThread(false); } And this is the generated .di file: static property property isGUIThread() { return cast(bool)IsGUIThread(false); } I have several other static property fields too, but this is the only one affected. Is this issue already in bugzilla? Or do I have to try to reproduce it in a smaller testcase?http://d.puremagic.com/issues/show_bug.cgi?id=6360
Aug 08 2011
simendsjo:Is this by design, or just an implementation oddity?Or a design oddity? Bye, bearophile
Aug 08 2011