bugfix: tests/reject/tnoinst.nim is now rejected properly
This commit is contained in:
parent
76886432da
commit
e362cbbfd7
5 changed files with 27 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue