Skip to content

Commit

Permalink
add tests when using .len on other types
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed May 19, 2024
1 parent 2b4ccdb commit 35ca147
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/tools/vvet/tests/empty_string.vv
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,13 @@ fn main() {

if foo.len < 1 || bar.len > 0 || (foo.len == 0 && bar.len == 0) {
}

// Should not notify when `.len` is used with other types.
baz := ['baz']
_ := baz.len == 0

foobar := {
'foo': 'bar'
}
_ := foobar.len < 1
}

0 comments on commit 35ca147

Please sign in to comment.