diff --git a/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.out b/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.out index b16915eae474d0..94bda77a79c9a6 100644 --- a/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.out +++ b/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.out @@ -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 diff --git a/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv b/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv index 77a8ecc7a36dbf..474269576562fd 100644 --- a/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv +++ b/vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv @@ -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 { } diff --git a/vlib/v/checker/tests/option_ptr_without_unwrapp_err.out b/vlib/v/checker/tests/option_ptr_without_unwrapp_err.out index 9281c74cb43215..195b0f917157a0 100644 --- a/vlib/v/checker/tests/option_ptr_without_unwrapp_err.out +++ b/vlib/v/checker/tests/option_ptr_without_unwrapp_err.out @@ -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 | } diff --git a/vlib/v/checker/tests/option_ptr_without_unwrapp_err.vv b/vlib/v/checker/tests/option_ptr_without_unwrapp_err.vv index 107dc02e794d01..945681069d88e7 100644 --- a/vlib/v/checker/tests/option_ptr_without_unwrapp_err.vv +++ b/vlib/v/checker/tests/option_ptr_without_unwrapp_err.vv @@ -3,7 +3,7 @@ struct Node { } fn set_trace(n Node) { - if n.parent != none { + if n.parent == none { set_trace(n.parent) } }