Revert "Revert "static and default params for generics""

This reverts commit 0662ec4a43.
This commit is contained in:
Zahary Karadjov 2013-08-19 01:29:37 +03:00
commit f760bc243b
4 changed files with 95 additions and 64 deletions

View file

@ -721,7 +721,8 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
# TGObj[T] = object
# TAlias[T] = TGObj[T]
#
a.sons[1] = semGenericParamList(c, a.sons[1], s.typ)
s.typ.n = semGenericParamList(c, a.sons[1], s.typ)
a.sons[1] = s.typ.n
s.typ.size = -1 # could not be computed properly
# we fill it out later. For magic generics like 'seq', it won't be filled
# so we use tyEmpty instead of nil to not crash for strange conversions