diff options
Diffstat (limited to 'tests/run')
-rwxr-xr-x | tests/run/tenumhole.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run/tenumhole.nim b/tests/run/tenumhole.nim index b721c73dd..a35526378 100755 --- a/tests/run/tenumhole.nim +++ b/tests/run/tenumhole.nim @@ -13,8 +13,11 @@ type valueC, valueD = (4, "abc") +# test the new "proc body can be an expr" feature: +proc getValue: TMyEnum = valueD + # trick the optimizer with a variable: -var x = valueD +var x = getValue() echo valueA, ord(valueA), valueB, ord(valueB), valueC, valueD, ord(valueD), x |