Skip to content

Commit

Permalink
error -> warn
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Apr 9, 2024
1 parent fbc69a4 commit 021e9e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vlib/v/checker/struct.v
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ or use an explicit `unsafe{ a[..] }`, if you do not want a copy of the slice.',
} else {
parts.last()
}
c.error('cannot access private field `${field.name}` on `${mod_type}`',
c.warn('cannot access private field `${field.name}` on `${mod_type}`',
init_field.pos)
break
}
Expand Down
4 changes: 2 additions & 2 deletions vlib/v/checker/tests/struct_field_private_err.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
vlib/v/checker/tests/struct_field_private_err.vv:8:2: error: cannot access private field `x` on `amod.Bcg`
vlib/v/checker/tests/struct_field_private_err.vv:8:2: warning: cannot access private field `x` on `amod.Bcg`
6 |
7 | _ := amod.Bcg{
8 | x: 0
| ~~~~
9 | }
10 |
vlib/v/checker/tests/struct_field_private_err.vv:11:10: error: cannot access private field `bar` on `amod.FooParams`
vlib/v/checker/tests/struct_field_private_err.vv:11:10: warning: cannot access private field `bar` on `amod.FooParams`
9 | }
10 |
11 | amod.foo(bar: 'bar')
Expand Down

0 comments on commit 021e9e9

Please sign in to comment.