1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix returning optional consts; fix csv test

This commit is contained in:
Alexander Medvednikov
2020-04-08 17:21:36 +02:00
parent 3abbdd4a39
commit 7a218286b3
4 changed files with 48 additions and 20 deletions

View File

@@ -112,10 +112,12 @@ fn (r mut Reader) read_record() ?[]string {
for {
// not quoted
if line[0] != `"` {
i = line.index(r.delimiter.str()) or {
// QTODO i = ...
j := line.index(r.delimiter.str()) or {
// last
break
}
i = j
fields << line[..i]
line = line[i+1..]
continue