From b1ed652bac5d20cc99bc431890150473f1a5e594 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 8 Nov 2023 05:45:03 +0200 Subject: [PATCH] ci: fix vlib/v/checker/tests/option_ref_init_err.vv/.out after e736eca --- vlib/v/checker/tests/option_ref_init_err.out | 18 ++++++++++++++++-- vlib/v/checker/tests/option_ref_init_err.vv | 4 ++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/vlib/v/checker/tests/option_ref_init_err.out b/vlib/v/checker/tests/option_ref_init_err.out index 8c2067813..c4b3382f1 100644 --- a/vlib/v/checker/tests/option_ref_init_err.out +++ b/vlib/v/checker/tests/option_ref_init_err.out @@ -1,12 +1,12 @@ vlib/v/checker/tests/option_ref_init_err.vv:9:18: warning: unnecessary default value of `none`: struct fields are zeroed by default 7 | mut: - 8 | a0 ?&Viewport + 8 | a0 ?&Viewport 9 | a1 ?&Viewport = none | ~~~~ 10 | a2 ?&Viewport = none 11 | a3 ?&Viewport = unsafe { nil } vlib/v/checker/tests/option_ref_init_err.vv:10:18: warning: unnecessary default value of `none`: struct fields are zeroed by default - 8 | a0 ?&Viewport + 8 | a0 ?&Viewport 9 | a1 ?&Viewport = none 10 | a2 ?&Viewport = none | ~~~~ @@ -19,3 +19,17 @@ vlib/v/checker/tests/option_ref_init_err.vv:12:18: error: `nil` is only allowed | ~~~ 13 | } 14 | +vlib/v/checker/tests/option_ref_init_err.vv:11:18: error: cannot assign `nil` to option value + 9 | a1 ?&Viewport = none + 10 | a2 ?&Viewport = none + 11 | a3 ?&Viewport = unsafe { nil } + | ~~~~~~ + 12 | a4 ?&Viewport = nil + 13 | } +vlib/v/checker/tests/option_ref_init_err.vv:12:18: error: cannot assign `nil` to option value + 10 | a2 ?&Viewport = none + 11 | a3 ?&Viewport = unsafe { nil } + 12 | a4 ?&Viewport = nil + | ~~~ + 13 | } + 14 | diff --git a/vlib/v/checker/tests/option_ref_init_err.vv b/vlib/v/checker/tests/option_ref_init_err.vv index db288ac73..3b0e1f1a8 100644 --- a/vlib/v/checker/tests/option_ref_init_err.vv +++ b/vlib/v/checker/tests/option_ref_init_err.vv @@ -5,7 +5,7 @@ mut: pub struct Window { mut: - a0 ?&Viewport + a0 ?&Viewport a1 ?&Viewport = none a2 ?&Viewport = none a3 ?&Viewport = unsafe { nil } @@ -14,4 +14,4 @@ mut: fn main() { _ := &Window{} -} \ No newline at end of file +} -- 2.39.5