mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* tests/assert/tassert_c.nim: explicitly enable stack traces * tests/errmsgs: explicitly enable stack traces
24 lines
413 B
Nim
24 lines
413 B
Nim
discard """
|
|
matrix: "--stackTrace:on"
|
|
outputsub: '''tproper_stacktrace2.nim(21) main'''
|
|
exitcode: 1
|
|
"""
|
|
|
|
proc returnsNil(): ref int = return nil
|
|
|
|
iterator fields*(a, b: int): int =
|
|
if a == b:
|
|
for f in a..b:
|
|
yield f
|
|
else:
|
|
for f in a..b:
|
|
yield f
|
|
|
|
proc main(): string =
|
|
result = ""
|
|
for i in fields(0, 1):
|
|
let x = returnsNil()
|
|
result &= "string literal " & $x[]
|
|
|
|
echo main()
|