fixes #6533
This commit is contained in:
parent
400a7ff1bb
commit
f673fbd91f
2 changed files with 9 additions and 2 deletions
|
|
@ -963,7 +963,8 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
|
||||||
let liftBody = liftingWalk(paramType.lastSon, true)
|
let liftBody = liftingWalk(paramType.lastSon, true)
|
||||||
if liftBody != nil:
|
if liftBody != nil:
|
||||||
result = liftBody
|
result = liftBody
|
||||||
result.shouldHaveMeta
|
result.flags.incl tfHasMeta
|
||||||
|
#result.shouldHaveMeta
|
||||||
|
|
||||||
of tyGenericInvocation:
|
of tyGenericInvocation:
|
||||||
for i in 1 ..< paramType.len:
|
for i in 1 ..< paramType.len:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
output: "@[2, 2, 2, 2, 2]"
|
output: '''@[2, 2, 2, 2, 2]
|
||||||
|
0'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #3144
|
# bug #3144
|
||||||
|
|
@ -26,3 +27,8 @@ proc sum[N: static[int]](vs: seq[IntArray[N]]): IntArray[N] =
|
||||||
result += v
|
result += v
|
||||||
|
|
||||||
echo sum(@[ones(5), ones(5)])
|
echo sum(@[ones(5), ones(5)])
|
||||||
|
|
||||||
|
# bug #6533
|
||||||
|
type Value[T: static[int]] = typedesc
|
||||||
|
proc foo(order: Value[1]): auto = 0
|
||||||
|
echo foo(Value[1])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue