[Issue 17223] New: Inconsistency between opDispatch explicit/implicit usage
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Feb 24 11:43:43 PST 2017
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: nobody at puremagic.com
Reporter: john.loughran.colvin at 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))
--
More information about the Digitalmars-d-bugs
mailing list