modify getTypeImpl to reduce result to final implementation (#6891)
* added test case for getTypeImpl * modify getTypeImpl to reduce result to final implementation
This commit is contained in:
parent
b87ef65532
commit
96a5062b8c
2 changed files with 15 additions and 5 deletions
|
|
@ -84,10 +84,10 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
|
|||
|
||||
if inst:
|
||||
if t.sym != nil: # if this node has a symbol
|
||||
if allowRecursion: # getTypeImpl behavior: turn off recursion
|
||||
allowRecursion = false
|
||||
else: # getTypeInst behavior: return symbol
|
||||
if not allowRecursion: # getTypeInst behavior: return symbol
|
||||
return atomicType(t.sym)
|
||||
#else: # getTypeImpl behavior: turn off recursion
|
||||
# allowRecursion = false
|
||||
|
||||
case t.kind
|
||||
of tyNone: result = atomicType("none", mNone)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue