diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-02-17 00:59:18 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-02-17 03:03:17 +0200 |
commit | 9dd753f218cb3f8a3460d66cf4f917fab74eb233 (patch) | |
tree | 7e7a33be0791e167ab88f0989d605aedb4ee34c7 /tests | |
parent | 9a41db7d7abaf92dbdef425605f68454d48b22b2 (diff) | |
download | Nim-9dd753f218cb3f8a3460d66cf4f917fab74eb233.tar.gz |
quite messy implementation of generic lambdas, needs reworking; fixes #715
Diffstat (limited to 'tests')
-rw-r--r-- | tests/generics/tgenericlambda.nim | 10 | ||||
-rw-r--r-- | tests/generics/tmetafield.nim | 2 |
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'" """ |