Skip to content

Commit

Permalink
ci: fix vlib/v/checker/tests/option_ref_init_err.vv/.out after e736eca
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Nov 8, 2023
1 parent e736eca commit b1ed652
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 16 additions & 2 deletions 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
| ~~~~
Expand All @@ -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 |
4 changes: 2 additions & 2 deletions vlib/v/checker/tests/option_ref_init_err.vv
Expand Up @@ -5,7 +5,7 @@ mut:

pub struct Window {
mut:
a0 ?&Viewport
a0 ?&Viewport
a1 ?&Viewport = none
a2 ?&Viewport = none
a3 ?&Viewport = unsafe { nil }
Expand All @@ -14,4 +14,4 @@ mut:

fn main() {
_ := &Window{}
}
}

0 comments on commit b1ed652

Please sign in to comment.