Apply suggestions from code review

This commit is contained in:
ringabout
2026-01-09 18:10:41 +08:00
committed by GitHub
parent 1d94d60c7b
commit 803ca09efb

View File

@@ -1846,7 +1846,7 @@ proc typeSectionFinalPass(c: PContext, n: PNode) =
if baseType.kind in {tyObject, tyTuple} and not baseType.n.isNil:
checkForMetaFields(c, baseType.n, hasError)
if s.typ.kind in {tySet, tyArray, tySequence} and s.typ.elementType.kind == tyNone:
if s.typ.kind in {tySet, tyArray, tySequence, tyUncheckedArray} and s.typ.elementType.kind == tyNone:
# magic generics are not filled but tyNone is added to its elements by default,
# we lift them to tyBuiltInTypeClass here
s.typ = newTypeS(tyBuiltInTypeClass, c,