make more tests green

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

View file

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

View file

@ -1,6 +1,6 @@
discard """ discard """
line: 18 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 #bug #442

View file

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

View file

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

View file

@ -1,6 +1,6 @@
discard """ discard """
line: 12 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.} = proc ugh[T](x: T) {.nimcall.} =

View file

@ -1,6 +1,6 @@
discard """ discard """
line: 16 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 = proc myGenericProc[T: object|tuple|ptr|ref|distinct](x: T): string =

View file

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

View file

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

View file

@ -1,5 +1,5 @@
discard """ 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 line: 27
""" """

View file

@ -1,6 +1,6 @@
discard """ discard """
line: "13" 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) = 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_param1 = new_parsed_parameter(PK_FLOAT, 3.41)
## parsed_param2 = new_parsed_parameter(PK_BIGGEST_INT, 2358123 * 23123) ## parsed_param2 = new_parsed_parameter(PK_BIGGEST_INT, 2358123 * 23123)
## # The following line doesn't compile due to ## # 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") ## #parsed_param3 = new_parsed_parameter(PK_INT, "231")
var result {.gensym.}: Tparsed_parameter var result {.gensym.}: Tparsed_parameter
result.kind = tkind result.kind = tkind

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
discard """ discard """
file: "tinvalidnewseq.nim" file: "tinvalidnewseq.nim"
line: 15 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 import re, strutils

View file

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

View file

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

View file

@ -1,7 +1,7 @@
discard """ discard """
file: "tnamedparams.nim" file: "tnamedparams.nim"
line: 8 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 import pegs

View file

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

View file

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