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

array: make .set() private + format

This commit is contained in:
Alexander Medvednikov 2019-08-31 02:35:05 +03:00
parent 29b4114bc0
commit 72363ada84
2 changed files with 23 additions and 23 deletions

View File

@ -311,7 +311,7 @@ fn (v mut V) compile() {
d.writeln(v.prof_counters())
}
dd := d.str()
cgen.lines.set(defs_pos, dd)// TODO `def.str()` doesn't compile
cgen.lines[defs_pos] = dd// TODO `def.str()` doesn't compile
v.generate_main()

View File

@ -153,7 +153,7 @@ pub fn (s array) slice(start, _end int) array {
return res
}
pub fn (a mut array) set(idx int, val voidptr) {
fn (a mut array) set(idx int, val voidptr) {
if idx < 0 || idx >= a.len {
panic('array index out of range: $idx / $a.len')
}