Skip to content

Length of the array returned from __newArray. #1588

Closed
@synxroform

Description

@synxroform

Maybe i miss something, but for arrays created with __newArray, value of length is always 44. For example ...

test.ts

export function test_length(arr: f64[]) : i32 {
    return arr.length;
}
export const F64A = idof<Float64Array>()

test.js

let arr = m.__retain(m.__newArray(m.F64A, [1, 2, 3, 4, 5]))
console.log(m.test_length(arr))
m.__release(arr)

output is 44

This is not the case for arrays created within AssemblyScript and returned as pointers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions