Files
Nim/tests/errmsgs/tunknown_named_parameter.nim
Timothee Cour dd362ab4c0 fix #13538 sigmatch errors are now sorted (#13701)
* fix #13538 sigmatch now sorted and has reliable order

* re-enable tests that were disabled because of that bug

* fix remaining tests and un-disable 2 other tests that were affected by this bug
2020-03-20 09:28:03 +01:00

28 lines
784 B
Nim

discard """
cmd: "nim check $file"
errormsg: "type mismatch: got <string, set[char], maxsplits: int literal(1)>"
nimout: '''
proc 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]
proc 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]
proc 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)