digitalmars.D.bugs - [Issue 8113] New: alias this doesn't forward opCall
- d-bugmail puremagic.com (18/18) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (7/7) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (8/8) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (8/8) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (15/22) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (11/11) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (17/24) May 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (8/9) May 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (12/12) May 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (10/10) May 19 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (11/11) May 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
- d-bugmail puremagic.com (10/10) May 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8113
http://d.puremagic.com/issues/show_bug.cgi?id=8113 Summary: alias this doesn't forward opCall Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: wfunction hotmail.com --- Comment #0 from wfunction hotmail.com 2012-05-17 11:26:53 PDT --- And, in fact, opDispatch doesn't do that, either. Both of them should treat opCall like a normal member. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-05-17 20:35:54 PDT --- Please give us an actual and possible reduced code. otherwise, this might become useless report. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #2 from wfunction hotmail.com 2012-05-17 21:34:38 PDT --- struct C { void opCall() { } } struct A { C c; alias c this; } void main() { A f; f(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #3 from wfunction hotmail.com 2012-05-17 21:36:14 PDT --- And regarding opDispatch: struct C { void opDispatch(string op, T...)(T) { } } void main() { C f; f(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid --- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2012-05-17 21:47:32 PDT --- (In reply to comment #2)struct C { void opCall() { } } struct A { C c; alias c this; } void main() { A f; f(); }Hmm, thank you. I'll try to fix the issues this weekend. (In reply to comment #3)And regarding opDispatch: struct C { void opDispatch(string op, T...)(T) { } } void main() { C f; f(); }I'm not sure this is valid. With current implementation, opDispatch cannot forward operator overloading like f.opDispatch!"opUnary". I think this is an enhancement issue about opDispatch feature. Creating new issue is better IMO. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #5 from wfunction hotmail.com 2012-05-17 22:21:32 PDT --- Thanks. Just wondering, why is the second one an 'enhancement'? Isn't opUnary just a member, which should also be opDispatch'ed? (I'm figuring that the only members which should not be opDispatch'able are: opDispatch itself, the constructors, and the destructor. Anything else, by definition, is dispatched on the object.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #6 from Kenji Hara <k.hara.pg gmail.com> 2012-05-17 23:04:02 PDT --- (In reply to comment #5)Thanks. Just wondering, why is the second one an 'enhancement'? Isn't opUnary just a member, which should also be opDispatch'ed?Today these forwarding doesn't work at all. struct S { void opDispatch(string op, A...)(A args){} } void main() { S s; +s; // not converted to opDispatch!("opUnary", ...) s + s; // not converted to opDispatch!("opBinary", ...) s(); // not converted to opDispatch!("opCall", ...) } So I think this is an enhancement rather than a bug.(I'm figuring that the only members which should not be opDispatch'able are: opDispatch itself, the constructors, and the destructor. Anything else, by definition, is dispatched on the object.)I think no. At least, constructor and destructor have some special features (e.g. can modify const members for construction), but opDispatch doesn't. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #7 from wfunction hotmail.com 2012-05-18 00:42:50 PDT --- (In reply to comment #6)Today these forwarding doesn't work at all.lol I imagined that was the bug. I guess you could call it the lack of a feature too haha. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 18 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|alias this and opDispatch() |alias this doesn't forward |don't forward opCall |opCall --- Comment #8 from Kenji Hara <k.hara.pg gmail.com> 2012-05-19 20:09:40 PDT --- I separated issues about opDispatch. http://d.puremagic.com/issues/show_bug.cgi?id=8122 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 19 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #9 from Kenji Hara <k.hara.pg gmail.com> 2012-05-19 20:13:01 PDT --- https://github.com/D-Programming-Language/dmd/pull/956 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 19 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 --- Comment #10 from github-bugzilla puremagic.com 2012-05-20 16:34:51 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3444b9cb5324d0b9e36282b9dc73b31f4c711ad8 fix Issue 8113 - alias this doesn't forward opCall https://github.com/D-Programming-Language/dmd/commit/417b793be589e95f923b54652ec408a106cbc7e6 Merge pull request #956 from 9rnsr/fix8133 Issue 8113 - alias this doesn't forward opCall -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 20 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8113 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 20 2012