summary refs log tree commit diff stats
path: root/compiler/ic
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-04-08 04:18:09 +0800
committerGitHub <noreply@github.com>2023-04-07 22:18:09 +0200
commita37a83cbff89867be9cbc5ba2f50c37e99efe0f1 (patch)
tree9b9345260e258a4a7511a002f3fd6963a6696a48 /compiler/ic
parent814d3e6818b6c4ed976818ecf525a599502e080e (diff)
downloadNim-a37a83cbff89867be9cbc5ba2f50c37e99efe0f1.tar.gz
fixes #21617; createTypeBoundOps with PContext in order to instantiate generics (#21619)
* fixes #21617; createTypeBoundOps with PContext in order to instantiate generics

* keep idgen
Diffstat (limited to 'compiler/ic')
-rw-r--r--compiler/ic/cbackend.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/ic/cbackend.nim b/compiler/ic/cbackend.nim
index 815078a36..21f69e485 100644
--- a/compiler/ic/cbackend.nim
+++ b/compiler/ic/cbackend.nim
@@ -50,7 +50,10 @@ proc generateCodeForModule(g: ModuleGraph; m: var LoadedModule; alive: var Alive
     let n = unpackTree(g, m.module.position, m.fromDisk.topLevel, p)
     cgen.genTopLevelStmt(bmod, n)
 
-  finalCodegenActions(g, bmod, newNodeI(nkStmtList, m.module.info))
+  let disps = finalCodegenActions(g, bmod, newNodeI(nkStmtList, m.module.info))
+  if disps != nil:
+    for disp in disps:
+      genProcAux(bmod, disp.sym)
   m.fromDisk.backendFlags = cgen.whichInitProcs(bmod)
 
 proc replayTypeInfo(g: ModuleGraph; m: var LoadedModule; origin: FileIndex) =