[Issue 23704] New: need `this` for a function accessed through a member alias tuple
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 12 22:36:14 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23704
Issue ID: 23704
Summary: need `this` for a function accessed through a member
alias tuple
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: maxsamukha at gmail.com
alias aliases(a...) = a;
struct V
{
int _0() { return 0; }
int _1;
alias t = aliases!(_0, _1);
alias t this;
}
void main()
{
V v;
auto x1 = v[0]; // fails
auto x2 = v.t[0]; // fails
auto x3 = v[1]; // ok
auto x4 = v.t[1]; // ok
}
--
More information about the Digitalmars-d-bugs
mailing list