quite messy implementation of generic lambdas, needs reworking; fixes #715
This commit is contained in:
parent
9a41db7d7a
commit
9dd753f218
9 changed files with 87 additions and 27 deletions
10
tests/generics/tgenericlambda.nim
Normal file
10
tests/generics/tgenericlambda.nim
Normal file
|
|
@ -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
|
||||
|
|
@ -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'"
|
||||
"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue