From ec50dab57d91fb33380a39479bafbeae48ed1a83 Mon Sep 17 00:00:00 2001 From: jcosborn Date: Sun, 14 May 2017 08:08:41 -0500 Subject: fixed macros.getTypeImpl for a symbol of type tyGenericBody (#5788) (#5812) * fixed macros.getTypeImpl for a symbol of type tyGenericBody * added test case and commented test code --- compiler/vmdeps.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim index 8c7388643..b2b1ec92b 100644 --- a/compiler/vmdeps.nim +++ b/compiler/vmdeps.nim @@ -175,7 +175,12 @@ proc mapTypeToAstX(t: PType; info: TLineInfo; result.add mapTypeToAst(t.sons[i], info) else: result = mapTypeToAstX(t.lastSon, info, inst, allowRecursion) - of tyGenericBody, tyOrdinal: + of tyGenericBody: + if inst: + result = mapTypeToAstX(t.lastSon, info, inst, true) + else: + result = mapTypeToAst(t.lastSon, info) + of tyOrdinal: result = mapTypeToAst(t.lastSon, info) of tyDistinct: if inst: -- cgit 1.4.1-2-gfad0