Skip to content

Commit 99a222d

Browse files
authored
Respect noinit for generic types (#25250)
1 parent 3e9a665 commit 99a222d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/ccgtypes.nim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ proc isOrHasImportedCppType(typ: PType): bool =
247247
searchTypeFor(typ.skipTypes({tyRef}), isImportedCppType)
248248

249249
proc hasNoInit(t: PType): bool =
250+
let t = skipTypes(t, {tyGenericInst})
250251
result = t.sym != nil and sfNoInit in t.sym.flags
251252

252253
proc getTypeDescAux(m: BModule; origTyp: PType, check: var IntSet; kind: TypeDescKind): Rope

0 commit comments

Comments
 (0)