fixes #4658
This commit is contained in:
parent
b9322010e9
commit
89f3e21fc8
2 changed files with 18 additions and 0 deletions
13
tests/generics/tlamba_in_generic.nim
Normal file
13
tests/generics/tlamba_in_generic.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: '''!!Hi!!'''
|
||||
"""
|
||||
# bug #4658
|
||||
import future
|
||||
|
||||
var x = 123
|
||||
|
||||
proc twice[T](f: T -> T): T -> T = (x: T) => f(f(x))
|
||||
|
||||
proc quote(s: string): string = "!" & s & "!"
|
||||
|
||||
echo twice(quote)("Hi")
|
||||
Loading…
Add table
Add a link
Reference in a new issue