test cases for the new features
This commit is contained in:
parent
911e6e710f
commit
66653e8f14
4 changed files with 78 additions and 4 deletions
17
tests/run/tstaticparams.nim
Normal file
17
tests/run/tstaticparams.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
discard """
|
||||
file: "tstaticparams.nim"
|
||||
output: "abracadabra\ntest"
|
||||
"""
|
||||
|
||||
type
|
||||
TFoo[T; Val: expr[string]] = object
|
||||
data: array[4, T]
|
||||
|
||||
proc takeFoo(x: TFoo) =
|
||||
echo "abracadabra"
|
||||
echo TFoo.Val
|
||||
|
||||
var x: TFoo[int, "test"]
|
||||
|
||||
takeFoo(x)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue