quite messy implementation of generic lambdas, needs reworking; fixes #715

This commit is contained in:
Zahary Karadjov 2014-02-17 00:59:18 +02:00
commit 9dd753f218
9 changed files with 87 additions and 27 deletions

View file

@ -1042,7 +1042,8 @@ proc typeAllowedAux(marker: var TIntSet, typ: PType, kind: TSymKind,
of tyEmpty:
result = taField in flags
of tyTypeClasses:
result = true
result = tfGenericTypeParam in t.flags or
taField notin flags
of tyGenericBody, tyGenericParam, tyGenericInvokation,
tyNone, tyForward, tyFromExpr, tyFieldAccessor:
result = false