diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 758c82fac57a..61a74a9710c8 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -136,9 +136,13 @@ proc prepareNode(cl: var TReplTypeVars, n: PNode): PNode = else: replaceTypeVarsS(cl, n.sym, replaceTypeVarsT(cl, n.sym.typ)) let isCall = result.kind in nkCallKinds + # don't try to instantiate symchoice symbols, they can be + # generic procs which the compiler will think are uninstantiated + # because their type will contain uninstantiated params + let isSymChoice = result.kind in nkSymChoices for i in 0..