August 25, 2009 [Issue 3263] New: Cannot use tuple foreach arguments in an array literal | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3263 Summary: Cannot use tuple foreach arguments in an array literal Product: D Version: 1.017 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: clugdbug@yahoo.com.au This is the second bug report in bug #1298, which is completely unrelated to the first one. ---- template Foo(Strings...) { const a2 = [Strings]; } alias Foo!("one", "two") foo; // Error: cannot implicitly convert expression (tuple("one","two")) of type (char[3], char[3]) to char -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 27, 2010 [Issue 3263] Cannot use tuple foreach arguments in an array literal | ||||
---|---|---|---|---|
| ||||
Posted in reply to clugdbug@yahoo.com.au | http://d.puremagic.com/issues/show_bug.cgi?id=3263 Shin Fujishiro <rsinfu@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |rsinfu@gmail.com Resolution| |DUPLICATE --- Comment #1 from Shin Fujishiro <rsinfu@gmail.com> 2010-10-27 15:23:44 PDT --- Expansion works inside dynamic array literals, but doesn't inside array initializers. The following works (both D1 & D2): template Foo(Strings...) { const a2 = ([Strings])[]; // as an array literal } alias Foo!("one", "two") foo; *** This issue has been marked as a duplicate of issue 1064 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation