made some tests green

This commit is contained in:
Araq 2014-09-21 23:57:54 +02:00
commit 3866820eee
11 changed files with 53 additions and 49 deletions

View file

@ -448,7 +448,7 @@ proc semConst(c: PContext, n: PNode): PNode =
if typ == nil:
localError(a.sons[2].info, errConstExprExpected)
continue
if not typeAllowed(typ, skConst):
if not typeAllowed(typ, skConst) and def.kind != nkNilLit:
localError(a.info, errXisNoType, typeToString(typ))
continue
v.typ = typ