[Issue 7047] alias error in struct only for dmd1
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 9 01:53:15 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7047
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |clugdbug at yahoo.com.au
Resolution| |INVALID
Severity|regression |normal
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-12-09 01:53:08 PST ---
This isn't a regression. It gave exactly the same error back in DMD 1.000.
In fact, it's not even a bug: in D1, 'this' for a struct is a pointer to that
struct. As you can see with this code:
struct Test1 {
static assert(is(typeof(this) == Test1)); // FAILS !!!
}
In D2, the 'this' pointer is the struct itself.
If you make this change:
- alias This* pThis;
+ alias This pThis;
your code will compile.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list