rascal
rascal copied to clipboard
CallFailed highlights the last/wrong parameter
Describe the bug
Whenever a function is called where the types or the arity of the parameters do not match the parameters of the function, the last parameter is highlighted. However, the last parameter might not be the one causing the error.
To Reproduce
Steps to reproduce the behaviour:
Define two functions:
int sum(int a, int b) {
return a + b;
}
and
void get_sum() {
str a = "3";
int b = 4;
println(sum(a, b));
}
Now run get_sum()
Expected behavior Since the type of the variable a does not match the type in the sum function, the error message should highlight a. However, now the error highlights b.
Stack traces CallFailed(["3",4]) at get_sum
Desktop (please complete the following information):
- Rascal Version v0.7.0