fixes #10886 [backport] (#10897)

This commit is contained in:
Andreas Rumpf 2019-03-23 14:44:53 +01:00 • committed by GitHub
commit 0b2a3f6f7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 7 deletions

View file

@ -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