mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
Allow single branch when statements
(cherry picked from commit 2102e3b02f)
This commit is contained in:
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()
|
||||
|
||||
Reference in New Issue
Block a user