various bugfixes for generics; added generic sort proc

This commit is contained in:
Araq 2011-03-03 02:01:22 +01:00
commit e424e13bd9
18 changed files with 392 additions and 113 deletions

View file

@ -123,7 +123,7 @@ proc suggestFieldAccess(c: PContext, n: PNode) =
else:
# fallback:
suggestEverything(c, n)
elif typ.kind == tyEnum:
elif typ.kind == tyEnum and n.kind == nkSym and n.sym.kind == skType:
# look up if the identifier belongs to the enum:
var t = typ
while t != nil: