js: fix -stats compilation of tests, proper alias codegen (#11327)

This commit is contained in:
playX 2021-08-28 16:57:33 +03:00 committed by GitHub
parent 25bf68e2f1
commit 118c5fdcd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 92 additions and 28 deletions

View file

@ -243,3 +243,11 @@ pub fn (mut a array) delete_last() {
[unsafe]
pub fn (a array) free() {
}
// todo: once (a []byte) will work rewrite this
pub fn (a array) bytestr() string {
res := ''
#a.arr.forEach((item) => res.str += String.fromCharCode(+item))
return res
}