summary refs log tree commit diff stats
path: root/tests/parser/tcommand_as_expr.nim
diff options
context:
space:
mode:
authorMichael Voronin <survivor.mail@gmail.com>2018-05-10 13:15:33 +0300
committerGitHub <noreply@github.com>2018-05-10 13:15:33 +0300
commit1051e8d69dbf71e93f653fecd8da3b8587e9b3d4 (patch)
treec9dde28d0d516ad5d0282766cc0ec44461abcef7 /tests/parser/tcommand_as_expr.nim
parent5ea967d97a30f0084883d4efa81b05bea3e5d148 (diff)
parent9048bcc54b5fe8d0ae8c24b9cf7454cfa897ce5a (diff)
downloadNim-1051e8d69dbf71e93f653fecd8da3b8587e9b3d4.tar.gz
Merge pull request #4 from nim-lang/devel
#4
Diffstat (limited to 'tests/parser/tcommand_as_expr.nim')
-rw-r--r--tests/parser/tcommand_as_expr.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/parser/tcommand_as_expr.nim b/tests/parser/tcommand_as_expr.nim
index a244c8767..b25ec4bd8 100644
--- a/tests/parser/tcommand_as_expr.nim
+++ b/tests/parser/tcommand_as_expr.nim
@@ -2,7 +2,10 @@ discard """
   output: '''140
 5-120-120
 359
-77'''
+77
+-4
+-1
+-1'''
 """
 #import math
 import sequtils
@@ -25,3 +28,11 @@ let a = [2,4,8].map do (d:int) -> int: d + 1
 echo a[0], a[1], a[2]
 
 echo(foo 8, foo 8)
+
+# bug #7582
+proc f(x: int): int = x
+
+echo f -4
+
+echo int -1 # doesn't compile
+echo int `-` 1 # compiles