From ec0294018570c5d0542904df7b01adaf05e3ac93 Mon Sep 17 00:00:00 2001 From: cooldome Date: Sat, 21 Jul 2018 13:01:47 +0200 Subject: Render bug: if expression with statement list expression as condition (#8375) * Fixes #8348 --- tests/macros/tmacrostmt.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/macros') diff --git a/tests/macros/tmacrostmt.nim b/tests/macros/tmacrostmt.nim index abb4cc050..9dbfbce43 100644 --- a/tests/macros/tmacrostmt.nim +++ b/tests/macros/tmacrostmt.nim @@ -57,5 +57,21 @@ proc test_block(x, y : int): int = result = x result = y +#------------------------------------ +# bugs #8348 + +template `>`(x, y: untyped): untyped = + ## "is greater" operator. This is the same as ``y < x``. + y < x + +proc test_cond_stmtlist(x, y: int): int = + result = x + if x > y: + result = x + + repr_and_parse(one_if_proc) repr_and_parse(test_block) +repr_and_parse(test_cond_stmtlist) + + -- cgit 1.4.1-2-gfad0