Summary: Invalid template constraints crash compiler
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2011-08-20 06:57:00 PDT ---
The following code crashes the compiler on Windows:

template allSatisfy(alias F, T...)
    enum bool allSatisfy = true;

template isIntegral(T)
    enum bool isIntegral = true;

// This is invalid because allSatisfy is passed sizes, not I.
void foo(I...)(I sizes)
if(allSatisfy!(isIntegral, sizes)) {}

void main() {
    auto arr = foo(42, 86);

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

Reply via email to