diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-03-23 14:44:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-23 14:44:53 +0100 |
commit | 0b2a3f6f7f7dfc40e08d287f41f7ce7c2e51fd9c (patch) | |
tree | 17fb723733fe4b10adcf27bd91e7e747b01ec29b /tests/vm/tvmmisc.nim | |
parent | 7c08303faf941da9faec8e7e31dd772b2f5b5acf (diff) | |
download | Nim-0b2a3f6f7f7dfc40e08d287f41f7ce7c2e51fd9c.tar.gz |
fixes #10886 [backport] (#10897)
Diffstat (limited to 'tests/vm/tvmmisc.nim')
-rw-r--r-- | tests/vm/tvmmisc.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index 78871d103..20adb5b8f 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -160,3 +160,21 @@ block: ["", "M", "MM", "MMM", "--", "-", "--", "---", "----", "--"], ] doAssert encoding.len == 4 + +# #10886 + +proc tor(): bool = + result = true + result = false or result + +proc tand(): bool = + result = false + result = true and result + +const + ctor = tor() + ctand = not tand() + +static: + doAssert ctor + doAssert ctand |