Render bug: if expression with statement list expression as condition (#8375)

* Fixes #8348
This commit is contained in:
cooldome 2018-07-21 13:01:47 +02:00 • committed by Andreas Rumpf
commit ec02940185
3 changed files with 29 additions and 5 deletions

View file

@ -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)