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

          Issue ID: 19120
           Summary: Cannot slice a struct with a tuple alias this
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: yshu...@gmail.com

Right now if a struct has a tuple as its alias this, we could index it at
compile time, but not slicing it.

struct A(T...) {
    alias S = T;
    alias S this;
}

alias X = A!(int, double);
alias Y = X[0]; // Fine
alias Z = X[0..$]; // Not fine?

https://godbolt.org/g/phwQFo

--

Reply via email to