CSE Machine: "Redeclaring name" error
Closed this issue · 1 comments
martin-henz commented
This program runs correctly in the default runtime, but gives an error when run in CSE machine:
function f() {
function g(t) {
return 0;
}
return g;
}
const h = f();
h(100);
(https://share.sourceacademy.nus.edu.sg/i8q0o)
The error: Line 7: Redeclaring name h.
martin-henz commented
If function f has at least one parameter, the CSE machine will work correctly.