summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2014-02-17 00:59:18 +0200
committerZahary Karadjov <zahary@gmail.com>2014-02-17 03:03:17 +0200
commit9dd753f218cb3f8a3460d66cf4f917fab74eb233 (patch)
tree7e7a33be0791e167ab88f0989d605aedb4ee34c7 /tests
parent9a41db7d7abaf92dbdef425605f68454d48b22b2 (diff)
downloadNim-9dd753f218cb3f8a3460d66cf4f917fab74eb233.tar.gz
quite messy implementation of generic lambdas, needs reworking; fixes #715
Diffstat (limited to 'tests')
-rw-r--r--tests/generics/tgenericlambda.nim10
-rw-r--r--tests/generics/tmetafield.nim2
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/generics/tgenericlambda.nim b/tests/generics/tgenericlambda.nim
new file mode 100644
index 000000000..a71c592c5
--- /dev/null
+++ b/tests/generics/tgenericlambda.nim
@@ -0,0 +1,10 @@
+discard """
+  output: "10\n10"
+"""
+
+proc test(x: proc (a, b: int): int) =
+  echo x(5, 5)
+
+test(proc (a, b): auto = a + b)
+
+test do (a, b) -> auto: a + b
diff --git a/tests/generics/tmetafield.nim b/tests/generics/tmetafield.nim
index 5d2ec9b33..42353006d 100644
--- a/tests/generics/tmetafield.nim
+++ b/tests/generics/tmetafield.nim
@@ -1,7 +1,7 @@
 discard """
   cmd: "nimrod check $# $#"
   msg: "'proc' is not a concrete type"
-  msg: "'seq[Foo]' is not a concrete type."
+  msg: "'Foo' is not a concrete type."
   msg: "invalid type: 'TBaseMed'"
 """