From 98e76a1058df52c281a80921828f73396ac69d73 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 2 Oct 2019 17:01:27 +0200 Subject: [PATCH] fixes #12336 [backport] --- compiler/semtypinst.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 1b2f802299..f9908f90f6 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -589,7 +589,7 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType = for i in 0 ..< len(result): if result.sons[i] != nil: if result.sons[i].kind == tyGenericBody: - localError(cl.c.config, t.sym.info, + localError(cl.c.config, if t.sym != nil: t.sym.info else: cl.info, "cannot instantiate '" & typeToString(result.sons[i], preferDesc) & "' inside of type definition: '" &