[Issue 14603] New: "cannot alias an expression" when opDispatch results in a template
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Mon May 18 12:58:43 PDT 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=14603
          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 at puremagic.com
          Reporter: ag0aep6g at 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"`.
--
    
    
More information about the Digitalmars-d-bugs
mailing list