Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Nov 18, 2024
1 parent 91a0f0a commit b75933c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv:13:9: error: cannot assign to `b`: expected `bool`, not `fn (Bar) bool`
11 | mut b := false
12 | if f.f != none {
13 | b = f.f or { panic(err) }
13 | b = f.f
| ^
14 | } else {
15 | b = true
15 | assert false
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ struct Bar {}
fn (mut f Foo[T]) method(arg T) {
mut b := false
if f.f != none {
b = f.f or { panic(err) }
b = f.f
} else {
b = true
assert false
}
if b {
}
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/checker/tests/option_ptr_without_unwrapp_err.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
vlib/v/checker/tests/option_ptr_without_unwrapp_err.vv:7:13: error: cannot use `?&Node` as `Node`, it must be unwrapped first in argument 1 to `set_trace`
5 | fn set_trace(n Node) {
6 | if n.parent != none {
6 | if n.parent == none {
7 | set_trace(n.parent)
| ~~~~~~~~
8 | }
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/checker/tests/option_ptr_without_unwrapp_err.vv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ struct Node {
}

fn set_trace(n Node) {
if n.parent != none {
if n.parent == none {
set_trace(n.parent)
}
}
Expand Down

0 comments on commit b75933c

Please sign in to comment.