summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-10-02 19:54:02 +0200
committerAraq <rumpf_a@web.de>2018-10-02 19:54:02 +0200
commitf673fbd91fa8b75e71feff0df232f6c598653722 (patch)
treea0799816c3ebe0674461d3acbdec0eee967bd17d
parent400a7ff1bbdfa166a2e4ee7da946aeecf17e0cef (diff)
downloadNim-f673fbd91fa8b75e71feff0df232f6c598653722.tar.gz
fixes #6533
-rw-r--r--compiler/semtypes.nim3
-rw-r--r--tests/metatype/tstatic_ones.nim8
2 files changed, 9 insertions, 2 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 5394e291f..5e16b009a 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -963,7 +963,8 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
     let liftBody = liftingWalk(paramType.lastSon, true)
     if liftBody != nil:
       result = liftBody
-      result.shouldHaveMeta
+      result.flags.incl tfHasMeta
+      #result.shouldHaveMeta
 
   of tyGenericInvocation:
     for i in 1 ..< paramType.len:
diff --git a/tests/metatype/tstatic_ones.nim b/tests/metatype/tstatic_ones.nim
index 73a88447d..0020fdbf7 100644
--- a/tests/metatype/tstatic_ones.nim
+++ b/tests/metatype/tstatic_ones.nim
@@ -1,5 +1,6 @@
 discard """
-  output: "@[2, 2, 2, 2, 2]"
+  output: '''@[2, 2, 2, 2, 2]
+0'''
 """
 
 # bug #3144
@@ -26,3 +27,8 @@ proc sum[N: static[int]](vs: seq[IntArray[N]]): IntArray[N] =
     result += v
 
 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])