mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-20 18:06:53 +00:00
Fix the return value of GetType and friends when given a var T type. (#7701)
This commit is contained in:
@@ -208,7 +208,12 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
|
||||
result.add mapTypeToAst(t.sons[0], info)
|
||||
else:
|
||||
result = mapTypeToBracket("ref", mRef, t, info)
|
||||
of tyVar: result = mapTypeToBracket("var", mVar, t, info)
|
||||
of tyVar:
|
||||
if inst:
|
||||
result = newNodeX(nkVarTy)
|
||||
result.add mapTypeToAst(t.sons[0], info)
|
||||
else:
|
||||
result = mapTypeToBracket("var", mVar, t, info)
|
||||
of tyLent: result = mapTypeToBracket("lent", mBuiltinType, t, info)
|
||||
of tySink: result = mapTypeToBracket("sink", mBuiltinType, t, info)
|
||||
of tySequence: result = mapTypeToBracket("seq", mSeq, t, info)
|
||||
|
||||
Reference in New Issue
Block a user