Summary: static assert is triggered after tuple bounds check
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Ellery Newcomer <> 2012-08-21 
13:17:04 PDT ---
I find it very annoying that the following code results in a tuple out of
bounds error message and not only the static assert message.

template T(Ts...) {
    static assert(Ts.length > 1);
    alias Ts[1] Z;

void main() {
    alias T!(int).Z Z2;


wiz.d(4): Error: tuple index 1 exceeds 1
wiz.d(3): Error: static assert  (1LU > 1LU) is false
wiz.d(8):        instantiated from here: T!(int)

I think error reporting should stop at the static assert.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to