[Issue 16665] New: static assert is only checked after the following dependent type declaration
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Nov 7 04:17:16 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16665
Issue ID: 16665
Summary: static assert is only checked after the following
dependent type declaration
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kolos80 at bk.ru
For this code
--------
import std.meta;
alias tuple = AliasSeq!();
static assert(tuple.length == 2);
alias t0 = tuple[0];
--------
DMD gives the following errors:
bug.d(4): Error: tuple index 0 exceeds 0
bug.d(3): Error: static assert (0LU == 2LU) is false
I expect static assert to be checked first.
--
More information about the Digitalmars-d-bugs
mailing list