[Issue 11195] Error messages not suppressed in __traits(compiles, ...) for template instantiation nested in aggregate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 8 08:35:34 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11195
Simen Kjaeraas <simen.kjaras at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Error messages not |Error messages not
|suppressed in |suppressed in
|__traits(compiles,...) |__traits(compiles,...) for
| |template instantiation
| |nested in aggregate
--- Comment #2 from Simen Kjaeraas <simen.kjaras at gmail.com> 2013-10-08 08:35:33 PDT ---
True, I forgot mentioning that. Simplified example:
template bar(T...) {
alias bar = void;
}
void foo()() {}
void main() {
assert(!__traits(compiles, {struct A{bar!foo tmp;}}));
assert(!is(typeof({struct A{bar!foo tmp;}})));
}
Also worth noting that these work (note the lack of a surrounding struct):
assert(!__traits(compiles, {bar!foo tmp;}));
assert(!is(typeof({bar!foo tmp;})));
I updated the summary to reflect this.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list