failing test for static params
This commit is contained in:
parent
7a93a5f18e
commit
9061b8961e
1 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ type
|
||||||
TBar[T; I: expr[int]] = object
|
TBar[T; I: expr[int]] = object
|
||||||
data: array[I, T]
|
data: array[I, T]
|
||||||
|
|
||||||
|
TA1[T; I: expr[int]] = array[I, T]
|
||||||
|
TA2[T; I: expr[int]] = array[0..I, T]
|
||||||
|
TA3[T; I: expr[int]] = array[I-1, T]
|
||||||
|
|
||||||
proc takeFoo(x: TFoo) =
|
proc takeFoo(x: TFoo) =
|
||||||
echo "abracadabra"
|
echo "abracadabra"
|
||||||
echo TFoo.Val
|
echo TFoo.Val
|
||||||
|
|
@ -20,3 +24,8 @@ takeFoo(x)
|
||||||
var y: TBar[float, 4]
|
var y: TBar[float, 4]
|
||||||
echo high(y.data)
|
echo high(y.data)
|
||||||
|
|
||||||
|
var
|
||||||
|
t1: TA1
|
||||||
|
t2: TA2
|
||||||
|
t3: TA3
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue