Render bug: if expression with statement list expression as condition (#8375)
* Fixes #8348
This commit is contained in:
parent
5ea3b4d581
commit
ec02940185
3 changed files with 29 additions and 5 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue