Summary: Invalid template instantiations »leaked« by
                    is(typeof())/__traits(compiles, …)/Type::trySemantic
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD

--- Comment #0 from klickverbot <> 2011-09-04 21:29:25 PDT 
Okay, turns out that the »collateral regression« the fix for bug 6220 caused in
my code ([1]) really is a fundamental problem with how DMD handles template
instantiations in the face of error gagging, in this case because is(typeof())
is used (same for __traits(compiles, …)):

template A(T) {
  B!(T).Result result;

template B(U) {
  static assert(is(U == int));
  alias bool Result;

pragma(msg, is(typeof(A!short)));

The static assert in B!() should just cause is(typeof()) to evaluate to false,
but B!short is also added to the module member list, causing compilation to
fail because of !is(short == int).

I am working on a fix, but need an issue number to reference.


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

Reply via email to