fixes #429 and tstmtexpr

This commit is contained in:
Zahary Karadjov 2013-05-12 21:01:39 +03:00
commit b3103c4657
6 changed files with 35 additions and 22 deletions

View file

@ -1016,8 +1016,9 @@ proc typeAllowedAux(marker: var TIntSet, typ: PType, kind: TSymKind): bool =
of tyExpr, tyStmt, tyTypeDesc:
result = true
# XXX er ... no? these should not be allowed!
of tyGenericBody, tyGenericParam, tyForward, tyNone, tyGenericInvokation,
tyTypeClass:
of tyTypeClass:
result = true
of tyGenericBody, tyGenericParam, tyForward, tyNone, tyGenericInvokation:
result = false
of tyEmpty, tyNil:
result = kind == skConst