mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-12 14:48:14 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user