strutils.nim: Use func everywhere (#16281)
* strutils.nim: procs with {.noSideEffect.} -> func
* strutils.nim: procs without {.noSideEffect.} -> func
* strutils.nim: proc -> func for links
* strutils.nim: proc -> func in doc comments
* test: add strutils to strictFuncs test
* test: proc -> func in errmsg test
This commit is contained in:
parent
71e2a9e569
commit
84fea7c144
3 changed files with 299 additions and 330 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,7 @@ discard """
|
||||||
cmd: "nim c --experimental:strictFuncs --experimental:views $file"
|
cmd: "nim c --experimental:strictFuncs --experimental:views $file"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import tables, streams, nre, parsecsv, uri, httpcore
|
import tables, streams, nre, parsecsv, uri, httpcore, strutils
|
||||||
|
|
||||||
type
|
type
|
||||||
Contig2Reads = TableRef[string, seq[string]]
|
Contig2Reads = TableRef[string, seq[string]]
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ discard """
|
||||||
cmd: "nim check $file"
|
cmd: "nim check $file"
|
||||||
errormsg: "type mismatch: got <string, set[char], maxsplits: int literal(1)>"
|
errormsg: "type mismatch: got <string, set[char], maxsplits: int literal(1)>"
|
||||||
nimout: '''
|
nimout: '''
|
||||||
proc rsplit(s: string; sep: char; maxsplit: int = -1): seq[string]
|
func rsplit(s: string; sep: char; maxsplit: int = -1): seq[string]
|
||||||
first type mismatch at position: 2
|
first type mismatch at position: 2
|
||||||
required type for sep: char
|
required type for sep: char
|
||||||
but expression '{':'}' is of type: set[char]
|
but expression '{':'}' is of type: set[char]
|
||||||
proc rsplit(s: string; sep: string; maxsplit: int = -1): seq[string]
|
func rsplit(s: string; sep: string; maxsplit: int = -1): seq[string]
|
||||||
first type mismatch at position: 2
|
first type mismatch at position: 2
|
||||||
required type for sep: string
|
required type for sep: string
|
||||||
but expression '{':'}' is of type: set[char]
|
but expression '{':'}' is of type: set[char]
|
||||||
proc rsplit(s: string; seps: set[char] = Whitespace; maxsplit: int = -1): seq[
|
func rsplit(s: string; seps: set[char] = Whitespace; maxsplit: int = -1): seq[
|
||||||
string]
|
string]
|
||||||
first type mismatch at position: 3
|
first type mismatch at position: 3
|
||||||
unknown named parameter: maxsplits
|
unknown named parameter: maxsplits
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue