Skip to content

Commit 03562f4

Browse files
committed
Respect noinit for generic types
1 parent 7af4e3e commit 03562f4

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)