[Issue 4985] New: A missing length problem in typecons.Tuple
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 3 13:30:39 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4985
Summary: A missing length problem in typecons.Tuple
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-10-03 13:30:17 PDT ---
A (hopefully correct) reduced test case from page 30 of:
http://nwcpp.org/images/stories/nwcpp-2010-09.pdf
import std.concurrency: spawn, send;
void foo() {}
void main() {
foreach (b; [cast(immutable(ubyte)[])[1]])
send(spawn(&foo), b);
}
DMD 2.049 shows:
...\dmd\src\phobos\std\typecons.d(336): Error: no property 'length' for type
'immutable(char)'
This is the part of typecons.Tuple that gives the error:
static string injectNamedFields()
{
string decl = "";
foreach (i, name; staticMap!(extractName, fieldSpecs))
{
auto field = text("Identity!(field[", i, "])");
auto numbered = text("_", i);
decl ~= text("alias ", field, " ", numbered, ";");
if (name.length != 0) // line 336
{
decl ~= text("alias ", numbered, " ", name, ";");
}
}
return decl;
}
--
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