Skip to content

Commit b862f1b

Browse files
committed
all: fix remaining tests
1 parent c80a8a8 commit b862f1b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎vlib/builtin/array.v‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ pub fn (a &array) sorted(callback fn (voidptr, voidptr) int) array
972972
// })
973973
// assert a == ['1', '3', '5', 'hi']
974974
// ```
975-
pub fn (mut a array) sort_with_compare(callback fn (voidptr, voidptr) int) {
975+
pub fn (mut a array) sort_with_compare(callback fn (const_a voidptr, const_b voidptr) int) {
976976
$if freestanding {
977977
panic('sort_with_compare does not work with -freestanding')
978978
} $else {
@@ -983,7 +983,7 @@ pub fn (mut a array) sort_with_compare(callback fn (voidptr, voidptr) int) {
983983
// sorted_with_compare sorts a clone of the array. The original array is not modified.
984984
// It uses the results of the given function to determine sort order.
985985
// See also .sort_with_compare()
986-
pub fn (a &array) sorted_with_compare(callback fn (voidptr, voidptr) int) array {
986+
pub fn (a &array) sorted_with_compare(callback fn (const_a voidptr, const_b voidptr) int) array {
987987
mut r := a.clone()
988988
unsafe { vqsort(r.data, usize(r.len), usize(r.element_size), callback) }
989989
return r

‎vlib/crypto/sha512/sha512block_generic.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const _k = [
3838
fn block_generic(mut dig Digest, p_ []u8) {
3939
unsafe {
4040
mut p := p_
41-
mut w := [80]u64{}
41+
mut w := []u64{len: 80}
4242
mut h0 := dig.h[0]
4343
mut h1 := dig.h[1]
4444
mut h2 := dig.h[2]

‎vlib/v/ast/scope.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,5 @@ pub fn (mut sc Scope) mark_var_as_used(varname string) bool {
322322
}
323323

324324
pub fn (sc &Scope) str() string {
325-
return sc.show(0, 0)
325+
return sc.show(0, 3)
326326
}

0 commit comments

Comments
 (0)