Bug 19121 – Indexing a struct with a tuple alias this doesn't give you the thing at given index

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-07-27T09:53:31Z
Last change time
2018-07-27T10:02:36Z
Assigned to
No Owner
Creator
Yuxuan Shui

Comments

Comment #0 by yshuiv7 — 2018-07-27T09:53:31Z
struct A(T...) { alias S = T; alias S this; } alias X = A!(int, double); alias Y = X[0]; // Fine pragma(msg, Y); // Not int ?!?! // A!(int, double)[0] ??? Y y; pragma(msg, typeof(y)); pragma(msg, is(typeof(y) == int)); // false ?!
Comment #1 by yshuiv7 — 2018-07-27T09:57:10Z
No wait, so there is actually no way to index a struct with a tuple alias this?