parent
5d56361383
commit
7ea318a053
3 changed files with 27 additions and 6 deletions
20
tests/ccgbugs/tescaping_temps.nim
Normal file
20
tests/ccgbugs/tescaping_temps.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
# bug #4505
|
||||
|
||||
proc f(t: tuple[]) = discard
|
||||
f((block: ()))
|
||||
|
||||
# bug #4230
|
||||
# If we make `test` function return nothing - the bug disappears
|
||||
proc test(dothejob: proc()): int {.discardable.} =
|
||||
dothejob()
|
||||
|
||||
test proc() =
|
||||
let f = 15
|
||||
if f > 10:
|
||||
test proc() = discard
|
||||
# If we remove elif branch of the condition - the bug disappears
|
||||
elif f < 3:
|
||||
test proc() = discard
|
||||
else:
|
||||
test proc() = discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue