alegnani / pancake-verifier

2 stars 0 forks source link

Confusing error message #42

Closed JunmingZhao42 closed 1 month ago

JunmingZhao42 commented 1 month ago

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.