diff options
author | cooldome <cdome@bk.ru> | 2018-07-18 14:54:44 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-18 14:54:44 +0200 |
commit | a651809411b9b7f2d909f3ccfeeca844210a14de (patch) | |
tree | 6b69ad055c5221acdf388c1feec25ae0a5dc628e /tests/macros | |
parent | 6eedac3207cad9f7b4bfe8d631a9373a91b85846 (diff) | |
download | Nim-a651809411b9b7f2d909f3ccfeeca844210a14de.tar.gz |
Fixes #8343, Fixes #8344 (#8347)
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tmacrostmt.nim | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/macros/tmacrostmt.nim b/tests/macros/tmacrostmt.nim index a6e1e66dd..abb4cc050 100644 --- a/tests/macros/tmacrostmt.nim +++ b/tests/macros/tmacrostmt.nim @@ -43,4 +43,19 @@ macro repr_and_parse(fn: typed): typed = echo fn_impl.repr result = parseStmt(fn_impl.repr) -repr_and_parse(f) \ No newline at end of file +repr_and_parse(f) + + +#------------------------------------ +# bugs #8343 and #8344 +proc one_if_proc(x, y : int): int = + if x < y: result = x + else: result = y + +proc test_block(x, y : int): int = + block label: + result = x + result = y + +repr_and_parse(one_if_proc) +repr_and_parse(test_block) |