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

          Issue ID: 17701
           Summary: DMD does not properly gag errors when passing `typeof`
                    to a template inside __traits(compiles)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

import std.meta: AliasSeq, staticMap;

alias typesAndValues = AliasSeq!(int, false, char, "test");

//Error: found ',' when expecting '('
//Error: found ';' when expecting ')' following template argument list
//Error: semicolon expected to close alias declaration
assert(!__traits(compiles, { alias justTypes = staticMap!(typeof,
typeAndValues); }));

Tested with DMD 2.075.0. I'm not sure if this is a regression or not.

--

Reply via email to