From 89fae6096aef69afac6113ff9500b766a56446a0 Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Wed, 21 May 2025 05:04:33 +0200 Subject: [PATCH] builtin: fix recent cast warning for tests for map (fix compilation with -prod or -W) (#24532) --- vlib/builtin/map_test.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/builtin/map_test.v b/vlib/builtin/map_test.v index f3582d454b..67383bf337 100644 --- a/vlib/builtin/map_test.v +++ b/vlib/builtin/map_test.v @@ -222,8 +222,8 @@ fn test_various_map_value() { m17['test'] = u64(0) assert m17['test'] == u64(0) mut m18 := map[string]&int{} - m18['test'] = &int(0) - assert unsafe { m18['test'] } == &int(0) + m18['test'] = &int(unsafe { nil }) + assert unsafe { m18['test'] } == &int(unsafe { nil }) } fn test_string_arr() {