digitalmars.D.bugs - [Issue 5126] New: is expression: matched variadic arguments get empty
- d-bugmail puremagic.com (47/47) Oct 27 2010 http://d.puremagic.com/issues/show_bug.cgi?id=5126
- d-bugmail puremagic.com (11/11) Jun 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5126
http://d.puremagic.com/issues/show_bug.cgi?id=5126 Summary: is expression: matched variadic arguments get empty Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: minor Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: rsinfu gmail.com --- Pattern matching against template variadic arguments was fixed in bug 2725 and now works, but there's still a problem. The matched arguments don't get correctly aliased: -------------------- struct Test(T...) {} void main() { alias Test!(int, double, string) Test1; static if (is(Test1 _ : Test!U, U...)) { static assert(U.length == 3, U.stringof); // (9) } } -------------------- % dmd -o- -c test.d test.d(9): Error: static assert "()"c -------------------- It works fine if U is not variadic: -------------------- struct Test(int n) {} void main() { alias Test!100 Test1; static if (is(Test1 _ : Test!n, int n)) { static assert(n == 100); // fine } else static assert(0); } -------------------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 27 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5126 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Works in 2.060head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 29 2012