We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 903c480 commit abc5cc7Copy full SHA for abc5cc7
src/lib/compiler.ts
@@ -4502,6 +4502,15 @@ export default class Compiler {
4502
4503
this.currentInline = fn.name.getText();
4504
fn.parameters.forEach((p, i) => {
4505
+ if (this.frame[p.name.getText()] !== undefined) {
4506
+ throw Error(
4507
+ `Cannot call "${this.currentInline}" in "${
4508
+ this.currentSubroutine.name
4509
+ }" because "${p.name.getText()}" is the name of a parameter in ${
4510
+ this.currentInline
4511
+ } and the name of a variable in "${this.currentSubroutine.name}"`
4512
+ );
4513
+ }
4514
this.initializeVariable(args[i], args[i], p.name.getText());
4515
});
4516
this.processNode(fn.body!);
0 commit comments