Fixed a bug with the 'do notation' consuming statements after it.
This commit is contained in:
parent
9257c29ffd
commit
b9d75f8944
2 changed files with 25 additions and 12 deletions
17
tests/run/tdomulttest.nim
Normal file
17
tests/run/tdomulttest.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
discard """
|
||||
file: "tasynciossl.nim"
|
||||
cmd: "nimrod cc --hints:on --define:ssl $# $#"
|
||||
output: "555\ntest\nmulti lines\n99999999\nend"
|
||||
"""
|
||||
proc foo(bar, baz: proc (x: int): int) =
|
||||
echo bar(555)
|
||||
echo baz(99999999)
|
||||
|
||||
foo do (x: int) -> int:
|
||||
return x
|
||||
do (x: int) -> int:
|
||||
echo("test")
|
||||
echo("multi lines")
|
||||
return x
|
||||
|
||||
echo("end")
|
||||
Loading…
Add table
Add a link
Reference in a new issue