summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 08d6d44e6..5a72632ef 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1711,6 +1711,8 @@ proc addThis(c: PContext, n: PNode, t: PType, owner: TSymKind) =
   c.p.resultSym = s
   n.add newSymNode(c.p.resultSym)
   addParamOrResult(c, c.p.resultSym, owner)
+  #resolves nim's obj ctor inside cpp ctors see #22669
+  s.ast = c.semExpr(c, newTree(nkCall, t[0].sym.ast[0]))
 
 proc addResult(c: PContext, n: PNode, t: PType, owner: TSymKind) =
   template genResSym(s) =