[Issue 6481] New: composition with alias this doesn't work inside the struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 12 12:56:37 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6481
Summary: composition with alias this doesn't work inside the
struct
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-08-12 12:56:34 PDT ---
struct Memory
{
int foo;
}
struct Image
{
Memory sup;
alias sup this;
void bla()
{
foo = 1;
}
}
$ dmd -c test.d
DMD v2.054 DEBUG
test.d(12): Error: undefined identifier foo
Using this.foo = 1 fixes it.
--
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