close #7104 by writing a test
This commit is contained in:
parent
d79fb77974
commit
ee6df5bd24
1 changed files with 21 additions and 2 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''true
|
output: '''true
|
||||||
(999, 0)'''
|
(999, 0)
|
||||||
|
ok 0
|
||||||
|
ok 1
|
||||||
|
ok 2
|
||||||
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -61,3 +65,18 @@ proc foo(): proc =
|
||||||
return (a, 0)
|
return (a, 0)
|
||||||
|
|
||||||
echo foo()()
|
echo foo()()
|
||||||
|
|
||||||
|
|
||||||
|
block tissue7104:
|
||||||
|
proc sp(cb: proc())=
|
||||||
|
cb()
|
||||||
|
|
||||||
|
sp:
|
||||||
|
var i = 0
|
||||||
|
echo "ok ", i
|
||||||
|
sp():
|
||||||
|
inc i
|
||||||
|
echo "ok ", i
|
||||||
|
sp do:
|
||||||
|
inc i
|
||||||
|
echo "ok ", i
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue