Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Nov 18, 2024
1 parent 6d64cc2 commit 6908045
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions vlib/v/checker/tests/assign_type_mismatch_with_generics_err.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv:13:11: error: unexpected `or` block, the field `f` is not an Option or a Result
11 | mut b := false
12 | if f.f != none {
13 | b = f.f or { panic(err) }
| ~~~~~~~~~~~~~~~~~~
14 | } else {
15 | b = true
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
13 | b = f.f or { panic(err) }
| ^
14 | } else {
15 | assert false
15 | b = true
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
b = f.f or { panic(err) }

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / alpine-docker-musl-gcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / alpine-docker-musl-gcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / alpine-docker-musl-gcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / alpine-docker-musl-gcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang (macos-14)

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang (macos-14)

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang (macos-14)

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang (macos-14)

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / msvc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / msvc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / msvc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / msvc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / tcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / ubuntu-docker-musl

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / ubuntu-docker-musl

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / ubuntu-docker-musl

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / ubuntu-docker-musl

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / gcc

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang

unexpected `or` block, the field `f` is not an Option or a Result

Check failure on line 13 in vlib/v/checker/tests/assign_type_mismatch_with_generics_err.vv

View workflow job for this annotation

GitHub Actions / clang

cannot assign to `b`: expected `bool`, not `fn (Bar) bool`
} else {
assert false
b = true
}
if b {
}
Expand Down

0 comments on commit 6908045

Please sign in to comment.