Thread overview | ||||||
---|---|---|---|---|---|---|
|
August 14, 2011 [Issue 6492] New: properties of alias this'd array overrides method | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6492 Summary: properties of alias this'd array overrides method Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: mrmocool@gmx.de --- Comment #0 from Trass3r <mrmocool@gmx.de> 2011-08-14 09:35:08 PDT --- import std.stdio; struct F { int[] g; alias g this; auto ptr() { return g.ptr; write("ptr\n"); } } void main() { F a; auto p = a.ptr; } prints nothing even though ptr method should override g's .ptr -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 23, 2011 [Issue 6492] properties of alias this'd array overrides method | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | http://d.puremagic.com/issues/show_bug.cgi?id=6492 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-10-23 02:32:51 PDT --- This is sample-code bug. import std.stdio; struct F { int[] g; alias g this; auto ptr() { write("ptr\n"); // print before return return g.ptr; } } void main() { F a; auto p = a.ptr; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 23, 2011 [Issue 6492] properties of alias this'd array overrides method | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | http://d.puremagic.com/issues/show_bug.cgi?id=6492 --- Comment #2 from Trass3r <mrmocool@gmx.de> 2011-10-23 07:07:04 PDT --- How embarrassing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 23, 2011 [Issue 6492] properties of alias this'd array overrides method | ||||
---|---|---|---|---|
| ||||
Posted in reply to Trass3r | http://d.puremagic.com/issues/show_bug.cgi?id=6492 --- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2011-10-23 07:15:24 PDT --- Never mind! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation