http://d.puremagic.com/issues/show_bug.cgi?id=7868



--- Comment #7 from Walter Bright <bugzi...@digitalmars.com> 2012-04-09 
17:14:36 PDT ---
It turns out, the A template is irrelevant. Perhaps this is clearer:

template B(T) {
  mixin({
    foreach (name; __traits(derivedMembers, C)) {}
    return "struct B {}";
  }());
}

struct C {
  pragma(msg, "This is true: ", is(B!C));

  static if (is(B!C)) {
    B!C b;
  } else {
    pragma(msg, "But wasn't in the static if.");
  }

  pragma(msg, "Here again, though: ", is(B!C));
}

auto e = C.init.b;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to