fix #13515 [backport] (#20315)

* fix #13515

* only compile test

* no idea why this PR is unlocking this

* don't rope in symchoices

* even more restrictive
This commit is contained in:
metagn 2022-09-11 09:33:24 +03:00 • committed by GitHub
commit 58e6d439d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

16
tests/template/t13515.nim Normal file
View file

@ -0,0 +1,16 @@
discard """
action: compile
"""
template test: bool = true
# compiles:
if not test:
echo "wtf"
# does not compile:
template x =
if not test:
echo "wtf"
x