Bug 8908 – Collapse of std.csv by the specifications change of std.conv.parse
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-29T06:27:00Z
Last change time
2012-12-18T16:16:37Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
zan77137
Comments
Comment #0 by zan77137 — 2012-10-29T06:27:45Z
This code doesn't work on git head(53527bbece), and the code works well on dmd 2.060:
----------------------------
import std.csv, std.stdio;
string csv = ` 1.0, 1.1, 1.2
2.0, 2.1, 2.2
`;
void main()
{
static struct Data { real a, b, c; }
foreach (data; csvReader!Data(csv)) with (data)
{
writeln([a, b, c]);
}
}
---------------------------
In dmd 2.060:
[1, 1.1, 1.2]
[2, 2.1, 2.2]
In git head:
std.csv.CSVException@/usr/local/include/dmd2git/std/csv.d(1047): no digits seen
----------------
----------------
std.conv.ConvException@/usr/local/include/dmd2git/std/conv.d(2402): no digits seen
----------------
----------------
std.conv.ConvException@/usr/local/include/dmd2git/std/conv.d(1631): Unexpected ' ' when converting from type string to type real
----------------
----------------
Maybe, this regression is caused by pull requests #828 and #833
https://github.com/D-Programming-Language/phobos/pull/828https://github.com/D-Programming-Language/phobos/pull/833