markused: fix mark for array init from sumtype (fix #24887) (#24889)

This commit is contained in:
Felipe Pena 2025-07-13 15:07:42 -03:00 committed by GitHub
parent efd36b8917
commit 8ea42a69ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 0 deletions

View file

@ -865,6 +865,8 @@ or use an explicit `unsafe{ a[..] }`, if you do not want a copy of the slice.',
mut info := first_sym.info as ast.Struct
c.check_uninitialized_struct_fields_and_embeds(node, first_sym, mut info, mut
inited_fields)
} else if first_sym.kind == .array {
c.table.used_features.arr_init = true
}
}
.none {

View file

@ -0,0 +1,5 @@
type Dict = []string | string
fn main() {
_ := Dict{}
}