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

@ -28,7 +28,8 @@ proc equalGenericParams(procA, procB: PNode): bool =
return
a = procA.sons[i].sym
b = procB.sons[i].sym
if (a.name.id != b.name.id) or not sameTypeOrNil(a.typ, b.typ): return
if (a.name.id != b.name.id) or
not sameTypeOrNil(a.typ, b.typ, {TypeDescExactMatch}): return
if (a.ast != nil) and (b.ast != nil):
if not ExprStructuralEquivalent(a.ast, b.ast): return
result = true