fixes a collect() bug reported on the forum (#15156) [backport:1.2]
This commit is contained in:
parent
2d494f42f3
commit
64aec6eb85
3 changed files with 12 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ proc semIf(c: PContext, n: PNode; flags: TExprFlags): PNode =
|
|||
if it.len == 2:
|
||||
openScope(c)
|
||||
it[0] = forceBool(c, semExprWithType(c, it[0]))
|
||||
it[1] = semExprBranch(c, it[1])
|
||||
it[1] = semExprBranch(c, it[1], flags)
|
||||
typ = commonType(typ, it[1])
|
||||
closeScope(c)
|
||||
elif it.len == 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue