summary refs log tree commit diff stats
path: root/compiler/semcall.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semcall.nim')
-rw-r--r--compiler/semcall.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim
index e7c9226dd..adb87b5b4 100644
--- a/compiler/semcall.nim
+++ b/compiler/semcall.nim
@@ -655,7 +655,12 @@ proc semResolvedCall(c: PContext, x: var TCandidate,
           else:
             x.call.add c.graph.emptyNode
         of skType:
-          x.call.add newSymNode(s, n.info)
+          var tn = newSymNode(s, n.info)
+          # this node will be used in template substitution,
+          # pretend this is an untyped node and let regular sem handle the type
+          # to prevent problems where a generic parameter is treated as a value
+          tn.typ = nil
+          x.call.add tn
         else:
           internalAssert c.config, false