digitalmars.D.bugs - [Issue 8750] New: ICE when using any and all as a template condition
- d-bugmail puremagic.com (32/32) Oct 03 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8750
- d-bugmail puremagic.com (7/7) Oct 03 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8750
http://d.puremagic.com/issues/show_bug.cgi?id=8750 Summary: ICE when using any and all as a template condition Product: D Version: D2 Platform: All OS/Version: Windows Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: daniel350 bigpond.com --- Comment #0 from Daniel Cousens <daniel350 bigpond.com> 2012-10-03 21:22:41 PDT --- import std.stdio : writeln; import std.algorithm : any, all, countUntil, canFind; struct mystruct { int a, b; } int myfunc(string sw, R ...)(mystruct v) if (all!(x => any!(y => x == y)(R))(sw)) { // FIXME: Breaks DMD return mixin("v." ~ sw[0] ~ "+ v." ~ sw[1]); } void main() { mystruct z = {3, 4}; writeln(myfunc!("aa", 'a', 'b')(z)); } DPaste: http://dpaste.dzfl.pl/fe062cd3 ICE: dmd: mangle.c:81: char* mangle(Declaration*): Assertion `fd && fd->inferRetType' failed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 03 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8750 --- Comment #1 from Daniel Cousens <daniel350 bigpond.com> 2012-10-03 21:38:47 PDT --- The intention of the above is: all!(x => x in R)(sw). Therefore, the clearer code (still fails) would be: all!(x => any!(x)(R))(sw) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 03 2012