This commit is contained in:
Felipe Pena 2025-08-29 08:56:28 -03:00
parent eaf005e29f
commit 2e45bfac0f
2 changed files with 9 additions and 0 deletions

View file

@ -1183,6 +1183,9 @@ pub fn (mut w Walker) mark_by_sym(isym ast.TypeSymbol) {
w.mark_by_type(isym.info.key_type)
w.mark_by_type(isym.info.value_type)
w.features.used_maps++
if isym.info.value_type.has_flag(.option) {
w.used_option++
}
}
ast.Alias {
w.mark_by_type(isym.info.parent_type)

View file

@ -0,0 +1,6 @@
fn test_main() {
mut m := map[int]?u32{}
if c := m[0] {
println('c: ${c} not none!')
}
}