spicy icon indicating copy to clipboard operation
spicy copied to clipboard

`Builder::addTmp` does not take identifiers from wrapping scops into account

Open bbannier opened this issue 4 years ago • 0 comments

Builder::addTmp adds a suffix if if another identifier with the same name is found in the scope, but it does not take identifiers in outer scopes into account. This can lead to name clashes if an identifier with the same name is present in a higher scope.

We usually work around this by picking another name, but there is still the potential for us to introduce clashes without noticing it. This can lead to incorrect code. We should instead fix addTmp so it always introduces a new name.

bbannier avatar Jan 19 '22 10:01 bbannier