← Back to index
|
Original Bugzilla link
Bug 10538 – std.typecons.wrap should consider opDispatch
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-04T00:51:00Z
Last change time
2013-09-26T05:55:23Z
Keywords
pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2013-07-04T00:51:56Z
This code currently doesn't work, but it should. import std.typecons; interface Interface { int foo(); int bar(int); } class Pluggable { int opDispatch(string name, A...)(A args) { return 100; } } void main() { Interface i = wrap!Interface(new Pluggable()); assert(i.foo() == 100); assert(i.bar(10) == 100); }
Comment #1
by k.hara.pg — 2013-07-04T01:10:23Z
https://github.com/D-Programming-Language/phobos/pull/1386
Comment #2
by github-bugzilla — 2013-09-26T05:55:15Z
Commits pushed to master at
https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/01f9455fac16dd793949714295eca9713ed07af7
fix Issue 10538 - std.typecons.wrap should consider opDispatch
https://github.com/D-Programming-Language/phobos/commit/36aa69b5ff06980dca4e31df046c122a50f75c22
Merge pull request #1386 from 9rnsr/fix_wrap Issue 10536 & 10538 - std.typecons.wrap/unwrap bug fix and improvement