-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Code:
export function indexGenerator(alpha: i32): i32[] {
let results: i32[] = new Array(alpha);
for (let counter: i32 = 0; counter < alpha; counter++) {
results[counter] = counter;
}
return results;
};
Error:
Aborted(Assertion failed: Type::isSubType(newType, oldType), at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/passes/LocalSubtyping.cpp,148,doWalkFunction)
[2024-01-07T22:46:19.148] [ERROR] console - Aborted(Assertion failed: Type::isSubType(newType, oldType), at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/passes/LocalSubtyping.cpp,148,doWalkFunction). Build with -sASSERTIONS for more info.
Error details is in 'C:\Users\louis\AppData\Local\Temp\ts2wasm-log-r6GkvW\error.log'
Log details is in 'C:\Users\louis\AppData\Local\Temp\ts2wasm-log-r6GkvW\trace.log'
However the following code will generate the wasm-file:
New Code:
type i32_ = i32;
export function indexGenerator(alpha: i32_): i32_[] {
let results: i32_[] = new Array(alpha);
for (let counter: i32_ = 0; counter < alpha; counter++) {
results[counter] = counter;
}
return results;
};