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

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

View File

@@ -58,6 +58,8 @@ proc semSym(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
smoduleId != c.module.id and smoduleId != c.friendModule.id:
LocalError(n.info, errXCannotBePassedToProcVar, s.name.s)
result = symChoice(c, n, s)
if result.kind == nkSym and isGenericRoutine(result.sym):
LocalError(n.info, errInstantiateXExplicitely, s.name.s)
of skConst:
markUsed(n, s)
case skipTypes(s.typ, abstractInst).kind