implicit generics types as return types. removed the error message for capturing incorrect uses of `proc`

This commit is contained in:
Zahary Karadjov 2012-04-21 02:37:24 +03:00
commit 251c44ff04
6 changed files with 67 additions and 60 deletions

View file

@ -17,7 +17,8 @@ proc checkPartialConstructedType(info: TLineInfo, t: PType) =
elif t.kind == tyVar and t.sons[0].kind == tyVar:
LocalError(info, errVarVarTypeNotAllowed)
proc checkConstructedType*(info: TLineInfo, t: PType) =
proc checkConstructedType*(info: TLineInfo, typ: PType) =
var t = typ.skipTypes({tyDistinct})
if t.kind in {tyTypeClass}: nil
elif tfAcyclic in t.flags and skipTypes(t, abstractInst).kind != tyObject:
LocalError(info, errInvalidPragmaX, "acyclic")