bugfix: tests/reject/tnoinst.nim is now rejected properly

This commit is contained in:
Araq 2012-01-13 13:40:05 +01:00
commit e362cbbfd7
5 changed files with 27 additions and 2 deletions

View file

@ -1022,3 +1022,9 @@ proc getStrOrChar*(a: PNode): string =
internalError(a.info, "getStrOrChar")
result = ""
proc isGenericRoutine*(s: PSym): bool =
case s.kind
of skProc, skTemplate, skMacro, skIterator:
result = s.ast != nil and s.ast[genericParamsPos].kind != nkEmpty
else: nil