summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorJuan M Gómez <info@jmgomez.me>2023-10-11 07:28:00 +0100
committerGitHub <noreply@github.com>2023-10-11 08:28:00 +0200
commitbf72d87f249221ed6623321f3cca0de9b35e0e36 (patch)
tree45c024dd183eb706e47dfb34ca8b120cca90b215 /compiler
parent81b2ae747e307f4ab171d3b62a0e6ea8b6a81d3d (diff)
downloadNim-bf72d87f249221ed6623321f3cca0de9b35e0e36.tar.gz
adds support for noDecl in constructor (#22811)
Notice the test wouldnt link before
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgtypes.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index a5555048f..2f92cb12b 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -757,6 +757,7 @@ proc getRecordFields(m: BModule; typ: PType, check: var IntSet): Rope =
         isCtorGen = true
         if prc.typ.n.len == 1:
           isDefaultCtorGen = true
+      if lfNoDecl in prc.loc.flags: continue
       genMemberProcHeader(m, prc, header, false, true)
       result.addf "$1;$n", [header]
     if isCtorGen and not isDefaultCtorGen: