improved support for typedesc values

* can be stored in constants and variables (including in containers like sequences)
* can be passed to and returned from macros
This commit is contained in:
Zahary Karadjov 2012-09-25 00:22:32 +03:00
commit badb6c0f66
11 changed files with 90 additions and 79 deletions

View file

@ -163,6 +163,7 @@ proc genConstStmt(p: BProc, t: PNode) =
if it.kind == nkCommentStmt: continue
if it.kind != nkConstDef: InternalError(t.info, "genConstStmt")
var c = it.sons[0].sym
if c.typ.containsCompileTimeOnly: continue
if sfFakeConst in c.flags:
genSingleVar(p, it)
elif c.typ.kind in ConstantDataTypes and lfNoDecl notin c.loc.flags and