mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
parent
efd36b8917
commit
8ea42a69ca
4 changed files with 7 additions and 0 deletions
|
@ -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 {
|
||||
|
|
0
vlib/v/tests/skip_unused/array_init_from_sumtype.run.out
Normal file
0
vlib/v/tests/skip_unused/array_init_from_sumtype.run.out
Normal file
5
vlib/v/tests/skip_unused/array_init_from_sumtype.vv
Normal file
5
vlib/v/tests/skip_unused/array_init_from_sumtype.vv
Normal file
|
@ -0,0 +1,5 @@
|
|||
type Dict = []string | string
|
||||
|
||||
fn main() {
|
||||
_ := Dict{}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue