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/828 https://github.com/D-Programming-Language/phobos/pull/833
Comment #1 by k.hara.pg — 2012-12-10T18:39:57Z
Comment #2 by github-bugzilla — 2012-12-18T15:03:03Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b66012ef4ef73a913f15d6ff066980a090410324 fix Issue 8908 - Collapse of std.csv by the specifications change of std.conv.parse https://github.com/D-Programming-Language/phobos/commit/d9170a8c74c177fe6371718ac342a23718d08aaf Merge pull request #1001 from 9rnsr/fix8908 Issue 8908 - Collapse of std.csv by the specifications change of std.conv.parse