rascal icon indicating copy to clipboard operation
rascal copied to clipboard

alias declaration leaks local formal parameter names into surrounding module scope

Open jurgenvinju opened this issue 4 years ago • 0 comments

Take a declaration like this:

alias Parser = Tree (str input, loc origin);

This will somehow add input as a parameter into the current module scope. This is visible if you have other things called input in the current scope, because you get double declarations. An easy way to trigger these false positive double declarations is having two aliases with a simular variable name:

alias Parser = Tree(str input);
alias Annotator = Tree(Tree input);

jurgenvinju avatar Mar 18 '21 10:03 jurgenvinju