digitalmars.D.bugs - [Issue 11195] New: Error messages not suppressed in __traits(compiles,...)
- d-bugmail puremagic.com (27/27) Oct 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11195
- d-bugmail puremagic.com (10/10) Oct 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11195
- d-bugmail puremagic.com (26/26) Oct 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11195
http://d.puremagic.com/issues/show_bug.cgi?id=11195 Summary: Error messages not suppressed in __traits(compiles,...) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: simen.kjaras gmail.com PDT --- import std.traits : ParameterTypeTuple; void foo()() {} void main() { assert(!__traits(compiles, {struct A{ParameterTypeTuple!foo tmp;}})); } The above program fails to compile with this message: bug.d(6): Error: template instance ParameterTypeTuple!(foo) does not match template declaration ParameterTypeTuple(func...) if (func.length == 1 && isCallable!func) Replace ParameterTypeTuple!foo with a simple type, and things work wonderfully. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11195 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com 05:44:10 PDT --- Same issue with is(typeof()) as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11195 Simen Kjaeraas <simen.kjaras 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 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: -------
Oct 08 2013