summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r--compiler/ast.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 5f6b658cf..25c66e117 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -1359,7 +1359,8 @@ proc getStrOrChar*(a: PNode): string =
 proc isGenericRoutine*(s: PSym): bool = 
   case s.kind
   of skProc, skTemplate, skMacro, skIterator, skMethod, skConverter:
-    result = sfFromGeneric in s.flags
+    result = sfFromGeneric in s.flags or
+             (s.ast != nil and s.ast[genericParamsPos].kind != nkEmpty)
   else: nil
 
 proc isRoutine*(s: PSym): bool {.inline.} =