mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
18
tests/cpp/tevalorder.nim
Normal file
18
tests/cpp/tevalorder.nim
Normal file
@@ -0,0 +1,18 @@
|
||||
discard """
|
||||
output: '''0
|
||||
1
|
||||
2'''
|
||||
target: "cpp"
|
||||
"""
|
||||
|
||||
# bug #8202
|
||||
var current: int = 0
|
||||
|
||||
proc gen(): string = current.inc; $(current - 1)
|
||||
|
||||
proc allOut(a, b, c: string) =
|
||||
echo a
|
||||
echo b
|
||||
echo c
|
||||
|
||||
allOut(gen(), gen(), gen())
|
||||
Reference in New Issue
Block a user