https://issues.dlang.org/show_bug.cgi?id=17223

          Issue ID: 17223
           Summary: Inconsistency between opDispatch explicit/implicit
                    usage
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: john.loughran.col...@gmail.com

alias AliasSeq(TL ...) = TL;
int n;
struct S
{
    alias A = AliasSeq!(n, int);
    template opDispatch(string name)
    {
        alias this_ = this;
        alias opDispatch = AliasSeq!(__traits(getMember, this_, "A"));
    }
}

alias b = S.opDispatch!"B"; // OK
alias a = S.B; // Error: alias test.a cannot alias an expression tuple(n,
(int))

--

Reply via email to