require errormsg to be specified before file.
This commit is contained in:
parent
ca394ebd95
commit
1105d03644
264 changed files with 305 additions and 623 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
discard """
|
||||
line: 9
|
||||
errormsg: "address of 'result' may not escape its stack frame"
|
||||
line: 9
|
||||
"""
|
||||
# bug #5113
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 10
|
||||
errormsg: "'x' is not the first parameter; context: 'x.field[0]'"
|
||||
line: 10
|
||||
"""
|
||||
|
||||
type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue