1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

autofree: handle more statements

This commit is contained in:
Alexander Medvednikov
2020-10-18 00:48:06 +02:00
parent acc85be5ae
commit 55536bb364
4 changed files with 68 additions and 29 deletions

View File

@@ -241,6 +241,8 @@ two ',
four!']
s = strings.join(' ')
assert s.contains('one') && s.contains('two ') && s.contains('four')
empty := []string{len:0}
assert empty.join('A') == ''
}
fn test_clone() {
@@ -906,7 +908,7 @@ fn test_sorter() {
i: 102
}
]
cmp := fn (a, b &Ka) int {
cmp := fn (a &Ka, b &Ka) int {
return compare_strings(a.s, b.s)
}
arr.sort_with_compare(cmp)