Allow single branch when statements
This commit is contained in:
parent
081dfea746
commit
2102e3b02f
2 changed files with 27 additions and 3 deletions
21
tests/whenstmt/t12517.nim
Normal file
21
tests/whenstmt/t12517.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Test based on issue #12517
|
||||
|
||||
discard """
|
||||
nimout: '''
|
||||
nimvm
|
||||
both
|
||||
'''
|
||||
output: '''
|
||||
both
|
||||
'''
|
||||
"""
|
||||
|
||||
proc test() =
|
||||
when nimvm:
|
||||
echo "nimvm"
|
||||
echo "both"
|
||||
|
||||
static:
|
||||
test()
|
||||
test()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue