Skip to content

Commit

Permalink
markused: fix short program using a .u8_array() call (fix vlang#23298) (
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp authored Dec 29, 2024
1 parent 0351332 commit 50e3f9c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions vlib/v/markused/markused.v
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ pub fn mark_used(mut table ast.Table, mut pref_ pref.Preferences, ast_files []&a
core_fns << '__new_array_with_multi_default'
core_fns << '__new_array_with_multi_default_noscan'
core_fns << '__new_array_with_array_default'
core_fns << ref_array_idx_str + '.set'
}
if table.used_features.option_or_result {
include_panic_deps = true
Expand Down
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions vlib/v/tests/skip_unused/simple_array_init.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
x := '0xfe9a'
assert x.u8_array() == [u8(0xfe), 0x9a]
}

0 comments on commit 50e3f9c

Please sign in to comment.