made some tests green

This commit is contained in:
Araq 2013-05-19 17:06:11 +02:00
commit 7b36d3d6ff
6 changed files with 8 additions and 6 deletions

View file

@ -89,7 +89,8 @@ proc semDestructorCheck(c: PContext, n: PNode, flags: TExprFlags) {.inline.} =
if instantiateDestructor(c, n.typ):
LocalError(n.info, errGenerated,
"usage of a type with a destructor in a non destructible context")
if efDetermineType notin flags and n.typ.kind == tyTypeDesc:
if efDetermineType notin flags and n.typ.kind == tyTypeDesc and
c.p.owner.kind notin {skTemplate, skMacro}:
localError(n.info, errGenerated, "value expected, but got a type")
proc newDeref(n: PNode): PNode {.inline.} =