mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
* 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
28 lines
788 B
Nim
28 lines
788 B
Nim
discard """
|
|
cmd: "nim check $file"
|
|
errormsg: "type mismatch: got <string, set[char], maxsplits: int literal(1)>"
|
|
nimout: '''
|
|
func rsplit(s: string; sep: char; maxsplit: int = -1): seq[string]
|
|
first type mismatch at position: 2
|
|
required type for sep: char
|
|
but expression '{':'}' is of type: set[char]
|
|
func rsplit(s: string; sep: string; maxsplit: int = -1): seq[string]
|
|
first type mismatch at position: 2
|
|
required type for sep: string
|
|
but expression '{':'}' is of type: set[char]
|
|
func rsplit(s: string; seps: set[char] = Whitespace; maxsplit: int = -1): seq[
|
|
string]
|
|
first type mismatch at position: 3
|
|
unknown named parameter: maxsplits
|
|
|
|
expression: rsplit("abc:def", {':'}, maxsplits = 1)
|
|
'''
|
|
"""
|
|
|
|
|
|
# bug #8043
|
|
|
|
|
|
import strutils
|
|
"abc:def".rsplit({':'}, maxsplits = 1)
|