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

checker: check variable mutability for postfix exprs

This commit is contained in:
Enzo Baldisserri
2020-04-28 11:20:19 +02:00
committed by GitHub
parent 54b71242fe
commit 7bf8731778
16 changed files with 120 additions and 18 deletions

View File

@@ -5,14 +5,14 @@ fn test_sb() {
sb.write('hi')
sb.write('!')
sb.write('hello')
assert sb.str() == 'hi!hello'
assert sb.len == 8
assert sb.str() == 'hi!hello'
assert sb.len == 0
sb = strings.new_builder(10)
sb.write('a')
sb.write('b')
println(sb.str())
assert sb.str() == 'ab'
assert sb.len == 2
assert sb.str() == 'ab'
}
const (