require errormsg to be specified before file.

This commit is contained in:
Arne Döring 2018-11-29 16:07:51 +01:00 • committed by Araq
commit 1105d03644
264 changed files with 305 additions and 623 deletions

View file

@ -1,7 +1,7 @@
discard """
line: 9
errormsg: "address of 'result' may not escape its stack frame"
line: 9
"""
# bug #5113

View file

@ -1,6 +1,6 @@
discard """
line: 15
errmsg: "type mismatch: got <int>"
line: 15
nimout: '''type mismatch: got <int>
but expected one of:
proc inc[T: Ordinal | uint | uint64](x: var T; y = 1)

View file

@ -1,7 +1,7 @@
discard """
errormsg: "'bla' escapes its stack frame; context: 'bla'"
file: "tvarres1.nim"
line: 12
errormsg: "'bla' escapes its stack frame; context: 'bla'"
"""
var
@ -14,4 +14,3 @@ proc p(): var int =
p() = 45
echo g

View file

@ -1,7 +1,7 @@
discard """
errormsg: "expression has no address"
file: "tvarres2.nim"
line: 11
errormsg: "expression has no address"
"""
var
@ -13,4 +13,3 @@ proc p(): var int =
p() = 45
echo g

View file

@ -1,6 +1,6 @@
discard """
line: 10
errormsg: "'y' escapes its stack frame; context: 'forward(y)'"
line: 10
"""
proc forward(x: var int): var int = result = x

View file

@ -1,5 +1,4 @@
discard """
file: "tvartup.nim"
output: "2 3"
"""
# Test the new tuple unpacking
@ -9,5 +8,3 @@ proc divmod(a, b: int): tuple[di, mo: int] =
var (x, y) = divmod(15, 6)
echo x, " ", y
#OUT 2 3

View file

@ -1,6 +1,6 @@
discard """
line: 10
errormsg: "'x' is not the first parameter; context: 'x.field[0]'"
line: 10
"""
type