I have problems getting variadic or array arguments to work in Silver (Fire 11.0.0.2695 on macOS 12.0.1) and WASM. Here is a simple example:
func test(_ rest: [Any]) {
for arg in rest { // RuntimeError: memory access out of bounds
writeLn(arg)
}
}
@Export
public class Program {
public func Main() {
test([123456, 7])
writeLn("end")
}
}
The same thing happens if rest
is of type Any...
. However, if rest
is [Int]
or Int...
, the code works as expected. (I did get another type of error, null function or something, with one of them previously, but I haven’t been able to reproduce that since I restarted Fire.)