Fix #12517 Allow single branch when nimvm statements (#20577)

Allow single branch when statements
This commit is contained in:
Can Lehmann 2022-10-17 08:01:53 +02:00 • committed by GitHub
commit 2102e3b02f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 3 deletions

21
tests/whenstmt/t12517.nim Normal file
View 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()