make more tests green

This commit is contained in:
Araq
2018-02-10 20:55:05 +01:00
parent ef6eda4cb4
commit b57d14b1ae
20 changed files with 20 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
discard """
line: 10
errormsg: "type mismatch: got (type float, string)"
errormsg: "type mismatch: got <type float, string>"
"""
proc foo(T: typedesc; some: T) =

View File

@@ -1,6 +1,6 @@
discard """
line: 18
errormsg: "type mismatch: got (proc (s: TScgi: ScgiState or AsyncScgiState) | proc (client: AsyncSocket, headers: StringTableRef, input: string){.noSideEffect, gcsafe, locks: 0.}"
errormsg: "type mismatch: got <proc (s: TScgi: ScgiState or AsyncScgiState) | proc (client: AsyncSocket, headers: StringTableRef, input: string){.noSideEffect, gcsafe, locks: 0.}>"
"""
#bug #442

View File

@@ -2,7 +2,7 @@ discard """
file: "tcaseexpr1.nim"
line: 29
errormsg: "type mismatch: got (string) but expected 'int'"
errormsg: "type mismatch: got <string> but expected 'int'"
line: 23
errormsg: "not all cases are covered"

View File

@@ -1,5 +1,5 @@
discard """
errormsg: "type mismatch: got (mc.typ)"
errormsg: "type mismatch: got <mc.typ>"
line: 12
"""

View File

@@ -1,6 +1,6 @@
discard """
line: 12
errormsg: "type mismatch: got (proc (x: int){.gcsafe, locks: 0.})"
errormsg: "type mismatch: got <proc (x: int){.gcsafe, locks: 0.}>"
"""
proc ugh[T](x: T) {.nimcall.} =

View File

@@ -1,6 +1,6 @@
discard """
line: 16
errormsg: "type mismatch: got (int literal(232))"
errormsg: "type mismatch: got <int literal(232)>"
"""
proc myGenericProc[T: object|tuple|ptr|ref|distinct](x: T): string =

View File

@@ -1,5 +1,5 @@
discard """
errormsg: '''type mismatch: got (proc (s: string){.locks: 0.})'''
errormsg: '''type mismatch: got <proc (s: string){.locks: 0.}>'''
line: 11
"""
#5620

View File

@@ -1,5 +1,5 @@
discard """
errormsg: "type mismatch: got (seq[empty])"
errormsg: "type mismatch: got <seq[empty]>"
line: 16
"""

View File

@@ -1,5 +1,5 @@
discard """
errormsg: "got (ref Matrix[2, 2, system.float], ref Matrix[2, 1, system.float])"
errormsg: "got <ref Matrix[2, 2, system.float], ref Matrix[2, 1, system.float]>"
line: 27
"""

View File

@@ -1,6 +1,6 @@
discard """
line: "13"
errormsg: "type mismatch: got (int literal(8), int literal(5), int, int)"
errormsg: "type mismatch: got <int literal(8), int literal(5), int, int>"
"""
proc divmod(a, b: int, res, remainder: var int) =

View File

@@ -174,7 +174,7 @@ template new_parsed_parameter*(tkind: Tparam_kind, expr): Tparsed_parameter =
## parsed_param1 = new_parsed_parameter(PK_FLOAT, 3.41)
## parsed_param2 = new_parsed_parameter(PK_BIGGEST_INT, 2358123 * 23123)
## # The following line doesn't compile due to
## # type mismatch: got (string) but expected 'int'
## # type mismatch: got <string> but expected 'int'
## #parsed_param3 = new_parsed_parameter(PK_INT, "231")
var result {.gensym.}: Tparsed_parameter
result.kind = tkind

View File

@@ -1,5 +1,5 @@
discard """
errormsg: "type mismatch: got (string) but expected 'ptr'"
errormsg: "type mismatch: got <string> but expected 'ptr'"
line: 20
disabled: true
"""

View File

@@ -1,7 +1,7 @@
discard """
file: "tinc.nim"
line: 8
errormsg: "type mismatch: got (int)"
errormsg: "type mismatch: got <int>"
"""
var x = 0

View File

@@ -1,7 +1,7 @@
discard """
file: "tinout.nim"
line: 12
errormsg: "type mismatch: got (int literal(3))"
errormsg: "type mismatch: got <int literal(3)>"
"""
# Test in out checking for parameters

View File

@@ -1,7 +1,7 @@
discard """
file: "tinvalidnewseq.nim"
line: 15
errormsg: "type mismatch: got (array[0..6, string], int literal(7))"
errormsg: "type mismatch: got <array[0..6, string], int literal(7)>"
"""
import re, strutils

View File

@@ -1,6 +1,6 @@
discard """
line: 8
errormsg: "type mismatch: got (int literal(3))"
errormsg: "type mismatch: got <int literal(3)>"
"""
# please finally disallow Len(3)

View File

@@ -1,7 +1,7 @@
discard """
file: "tsimtych.nim"
line: 10
errormsg: "type mismatch: got (bool) but expected \'string\'"
errormsg: "type mismatch: got <bool> but expected \'string\'"
"""
# Test 2
# Simple type checking

View File

@@ -1,7 +1,7 @@
discard """
file: "tnamedparams.nim"
line: 8
errormsg: "type mismatch: got (input: string, filename: string, line: int literal(1), col: int literal(23))"
errormsg: "type mismatch: got <input: string, filename: string, line: int literal(1), col: int literal(23)>"
"""
import pegs

View File

@@ -1,5 +1,5 @@
discard """
errormsg: "type mismatch: got (int literal(5), b: bool)"
errormsg: "type mismatch: got <int literal(5), b: bool>"
line: 10
"""

View File

@@ -1,7 +1,7 @@
discard """
file: "tadrdisc.nim"
line: 20
errormsg: "type mismatch: got (TKind)"
errormsg: "type mismatch: got <TKind>"
"""
# Test that the address of a dicriminants cannot be taken