This commit is contained in:
Zahary Karadjov 2017-06-10 23:14:25 +03:00 • committed by Andreas Rumpf
commit 367d232351
3 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,19 @@
discard """
output: '''
(x: 100)
5
'''
"""
type
OdArray*[As: static[int], T] = object
x: int
proc initOdArray*[As: static[int], T](len: int): OdArray[As, T] =
result.l = len
echo initOdArray[10, int](100)
proc doStatic[N: static[int]](): int = N
echo doStatic[5]()