www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8176] New: Error: cannot implicitly convert expression (record) of type CsvRecord!(string,cast(Malformed)0,string,dchar) to string

http://d.puremagic.com/issues/show_bug.cgi?id=8176

           Summary: Error: cannot implicitly convert expression (record)
                    of type
                    CsvRecord!(string,cast(Malformed)0,string,dchar) to
                    string
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: alienballance gmail.com



15:17:17 PDT ---
std.csv looks just great on the first glance, but it's a pain to use in
reality.
One of the reasons is below:

private import
  std.csv;

void process(string smth) {}

void main()
{
  string str = "A \" is now part of the data";
  auto records = csvReader!(string,Malformed.ignore)(str);
  auto record = records.front;

  assert(record.front == str);
  process(record);
}

test.d(13): Error: function test.process (string smth) is not callable using
argument types (CsvRecord!(string,cast(Malformed)0,string,dchar))
test.d(13): Error: cannot implicitly convert expression (record) of type
CsvRecord!(string,cast(Malformed)0,string,dchar) to string

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 31 2012