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

parser: warn when fixed-size ArrayInit doesn't have trailing {}. (#6137)

This commit is contained in:
Nick Treleaven
2020-08-16 03:54:05 +01:00
committed by GitHub
parent a02593204f
commit bab5c21224
15 changed files with 27 additions and 28 deletions

View File

@@ -89,7 +89,7 @@ pub fn cp(old, new string) ? {
C.close(fp_from)
return error_with_code('cp: failed to write to $new', int(fp_to))
}
mut buf := [1024]byte
mut buf := [1024]byte{}
mut count := 0
for {
// FIXME: use sizeof, bug: 'os__buf' undeclared