Bug 14603 – "cannot alias an expression" when opDispatch results in a template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-18T19:58:00Z
Last change time
2016-02-29T17:48:08Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
ag0aep6g
Depends on
15310

Comments

Comment #0 by ag0aep6g — 2015-05-18T19:58:43Z
---- struct S { template opDispatch(string name) { void opDispatch()() {} } } alias a = S.opDispatch!"go"; /* ok */ alias b = S.go; /* 'Error: alias test.b cannot alias an expression opDispatch!"go"' */ ---- `S.go` should be equivalent to `S.opDispatch!"go"`.
Comment #1 by ag0aep6g — 2015-05-18T20:05:17Z
Probably related to issue 14604.
Comment #2 by k.hara.pg — 2015-06-07T08:23:36Z
Comment #3 by github-bugzilla — 2016-02-29T17:48:06Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/27872784ee47c032f356d8bac563e0b29782951a fix Issue 14603 - "cannot alias an expression" when opDispatch results in a template https://github.com/D-Programming-Language/dmd/commit/e5e8f3f9d468f9fafe5de9455f8dfed15b7fb035 Merge pull request #4726 from 9rnsr/fix14603 Issue 14603 & 14604 - aliasing opDispatch result