fix tests
This commit is contained in:
parent
a6526695f0
commit
b80d70b0f3
11 changed files with 153 additions and 73 deletions
|
|
@ -4,7 +4,7 @@ discard """
|
|||
proc fun0[T1: int | float |
|
||||
object | array | seq](a1: T1; a2: int)
|
||||
first type mismatch at position: 1
|
||||
required type: T1: int or float or object or array or seq[T]
|
||||
required type for a1: T1: int or float or object or array or seq[T]
|
||||
but expression 'byte(1)' is of type: byte
|
||||
|
||||
expression: fun0(byte(1), 0)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ nimout: '''
|
|||
but expected one of:
|
||||
proc main(a, b, c: string)
|
||||
first type mismatch at position: 1
|
||||
required type: string
|
||||
required type for a: string
|
||||
but expression '1' is of type: int literal(1)
|
||||
|
||||
expression: main(1, 2, 3)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ proc serve(server: AsyncHttpServer; port: Port;
|
|||
callback: proc (request: Request): Future[void] {.closure, gcsafe.};
|
||||
address = ""): Future[void]
|
||||
first type mismatch at position: 3
|
||||
required type: proc (request: Request): Future[system.void]{.closure, gcsafe.}
|
||||
required type for callback: proc (request: Request): Future[system.void]{.closure, gcsafe.}
|
||||
but expression 'cb' is of type: proc (req: Request): Future[system.void]{.locks: <unknown>.}
|
||||
This expression is not GC-safe. Annotate the proc with {.gcsafe.} to get extended error information.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ 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: char
|
||||
required type for sep: char
|
||||
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
|
||||
proc rsplit(s: string; sep: string; maxsplit: int = -1): seq[string]
|
||||
first type mismatch at position: 2
|
||||
required type: string
|
||||
required type for sep: string
|
||||
but expression '{':'}' is of type: set[char]
|
||||
|
||||
expression: rsplit("abc:def", {':'}, maxsplits = 1)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
discard """
|
||||
errormsg: "type mismatch: got <array[0..0, type int]>"
|
||||
line: 16
|
||||
line: 22
|
||||
nimout: '''
|
||||
twrong_at_operator.nim(16, 30) Error: type mismatch: got <array[0..0, type int]>
|
||||
twrong_at_operator.nim(22, 30) Error: type mismatch: got <array[0..0, type int]>
|
||||
but expected one of:
|
||||
proc `@`[T](a: openArray[T]): seq[T]
|
||||
first type mismatch at position: 1
|
||||
required type for a: openarray[T]
|
||||
but expression '[int]' is of type: array[0..0, type int]
|
||||
proc `@`[IDX, T](a: array[IDX, T]): seq[T]
|
||||
first type mismatch at position: 1
|
||||
required type for a: array[IDX, T]
|
||||
but expression '[int]' is of type: array[0..0, type int]
|
||||
|
||||
expression: @[int]
|
||||
'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue