diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index f0ce8d76f0c7..e87a4939a2f1 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -132,9 +132,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..