Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Delta456 committed Jan 19, 2025
1 parent 4a2c3ce commit 7f68daf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions vlib/v/tests/options/option_sumtype_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ pub fn teste() ?TType {

fn test_main() {
x := teste()
if x is []int {
dump(x)
y := x as []int
assert y == [1, 2]
return
if x != none {
if x is []int {
dump(x)
y := x as []int
assert y == [1, 2]
return
}
}
assert false
}

0 comments on commit 7f68daf

Please sign in to comment.