summary refs log tree commit diff stats
path: root/tests/varstmt/tvardecl.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/varstmt/tvardecl.nim')
-rw-r--r--tests/varstmt/tvardecl.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/varstmt/tvardecl.nim b/tests/varstmt/tvardecl.nim
new file mode 100644
index 000000000..d5ccfafb7
--- /dev/null
+++ b/tests/varstmt/tvardecl.nim
@@ -0,0 +1,19 @@
+discard """
+  output: "44"
+"""
+# Test the new variable declaration syntax
+import std/sequtils
+
+var
+  x = 0
+  s = "Hallo"
+  a, b: int = 4
+
+write(stdout, a)
+writeLine(stdout, b) #OUT 44
+
+proc p() = # bug #18104
+  var x, y = newSeqWith(10, newString(3))
+  discard (x, y)
+
+p()