I came across a confusing error message when I tried to transpile this below program:
fun plus_one(1 x) {
return x + 1;
}
fun main() {
var y = 42;
y = plus_one(y);
return 0;
}
I've got: Error: Unexpected symbol 'n'. The issue seems to relate to being y can't be updated when passing itself to a function as an argument. This program compiles successfully with pancake compiler but not with the transpiler.
Nevertheless, it might be easier if the error message can give an indication of what is unexpected, or some line number to refer to.
I came across a confusing error message when I tried to transpile this below program:
I've got:
Error: Unexpected symbol 'n'
. The issue seems to relate to beingy
can't be updated when passing itself to a function as an argument. This program compiles successfully with pancake compiler but not with the transpiler. Nevertheless, it might be easier if the error message can give an indication of what is unexpected, or some line number to refer to.