www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14603] New: "cannot alias an expression" when opDispatch


          Issue ID: 14603
           Summary: "cannot alias an expression" when opDispatch results
                    in a template
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: ag0aep6g gmail.com

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"`.

May 18 2015