diff options
author | Araq <rumpf_a@web.de> | 2011-07-28 00:53:52 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-07-28 00:53:52 +0200 |
commit | 2f066395baf0dd290bfdbb8ee47a64a17c932b14 (patch) | |
tree | 3cab7059beb39e763e64521b2c0f84983e64deb9 /tests/accept/run/tvarres1.nim | |
parent | e7135c449d065eaf3ea6d2ed06fd33cb62e5e44f (diff) | |
download | Nim-2f066395baf0dd290bfdbb8ee47a64a17c932b14.tar.gz |
bugfixes; step one for 'var T' as return type support
Diffstat (limited to 'tests/accept/run/tvarres1.nim')
-rw-r--r-- | tests/accept/run/tvarres1.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/accept/run/tvarres1.nim b/tests/accept/run/tvarres1.nim new file mode 100644 index 000000000..a48c961df --- /dev/null +++ b/tests/accept/run/tvarres1.nim @@ -0,0 +1,15 @@ +discard """ + output: "45" +""" + +var + g = 5 + +proc p(): var int = + var bla = addr(g) #: array [0..7, int] + result = bla[] + +p() = 45 + +echo g + |