Closed WalasPrime closed 6 years ago
Thank you for reporting this. There is a fix in a PR for improved messaging in flight #165
To help debug any other potential issues, could you provide the result of require('walt-compiler').VERSION
.
A couple of notes on your code above though.
Had a chance to validate your code snippet. Turns out that you had a subscript on a non array type, which when generated created an undefined opcode. This caused a hard fatal as you already brought up.
You want to change this line
export function func(a: i32, l: i32, f: ResultFnType): i32 {
to
export function func(a: i32[], l: i32, f: ResultFnType): i32 {
then you should be able to access a
like an array via a[i]
Thanks for reporting this, the code snippet was very helpful!
Bug Report
Overview
An unexpected error occurs when running a particular piece of code. No proper error description is given so there is no way of telling what is wrong.
Expected
A proper error message should be shown.
Actual
Example
This snippet fails (required
npm install walt-compiler
)Offtop
It would be nice if there was an example on how to work with array arguments/array results in Walt (or if it's even possible at the moment).