'bind' as a declarative statement
This commit is contained in:
parent
c138cc36b4
commit
51e01879ba
18 changed files with 204 additions and 93 deletions
10
tests/accept/compile/mtempl5.nim
Normal file
10
tests/accept/compile/mtempl5.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
var
|
||||
gx = 88
|
||||
gy = 44
|
||||
|
||||
template templ*(): int =
|
||||
bind gx, gy
|
||||
gx + gy
|
||||
|
||||
|
||||
5
tests/accept/compile/ttempl5.nim
Normal file
5
tests/accept/compile/ttempl5.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
import mtempl5
|
||||
|
||||
echo templ()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue