refactoring, fixes yet another strictFuncs regression (#15446)
This commit is contained in:
parent
b703f02ad2
commit
2b91845f1d
3 changed files with 34 additions and 8 deletions
17
tests/effects/tstrict_funcs.nim
Normal file
17
tests/effects/tstrict_funcs.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
discard """
|
||||
cmd: "nim c --experimental:strictFuncs $file"
|
||||
"""
|
||||
|
||||
import tables, streams, nre, parsecsv
|
||||
|
||||
type
|
||||
Contig2Reads = TableRef[string, seq[string]]
|
||||
|
||||
proc get_Contig2Reads(sin: Stream, fn: string, contig2len: TableRef[string, int]): Contig2Reads =
|
||||
result = newTable[string, seq[string]]()
|
||||
var parser: CsvParser
|
||||
open(parser, sin, filename = fn, separator = ' ', skipInitialSpace = true)
|
||||
while readRow(parser, 2):
|
||||
if contig2len.haskey(parser.row[1]):
|
||||
mgetOrPut(result, parser.row[1], @[]).add(parser.row[0])
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue