Allow wCodegenDecl on lambdas (#8892)
This commit is contained in:
parent
84eab97fed
commit
e81fe6d32f
2 changed files with 14 additions and 1 deletions
13
tests/ccgbugs/tcodegendecllambda.nim
Normal file
13
tests/ccgbugs/tcodegendecllambda.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
targets: "c cpp js"
|
||||
ccodecheck: "'HELLO'"
|
||||
"""
|
||||
|
||||
when defined(JS):
|
||||
var foo = proc(): void{.codegenDecl: "/*HELLO*/function $2($3)".} =
|
||||
echo "baa"
|
||||
else:
|
||||
var foo = proc(): void{.codegenDecl: "/*HELLO*/$1 $2 $3".} =
|
||||
echo "baa"
|
||||
|
||||
foo()
|
||||
Loading…
Add table
Add a link
Reference in a new issue