Skip to content

Commit

Permalink
Use name.lower to avoid case errors
Browse files Browse the repository at this point in the history
Co-authored-by: Balthasar Reuter <[email protected]>
  • Loading branch information
rolfhm and reuterbal authored Oct 17, 2023
1 parent 78464c0 commit 05956e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion loki/transform/transform_inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ def _map_unbound_dims(var, val):
member.spec = shadow_mapper.visit(member.spec)

var_map = {}
duplicate_locals_names = {dl.name.lower() for dl in duplicate_locals}
for v in FindVariables(unique=False).visit(member.body):
if v.name in [dl.name for dl in duplicate_locals]:
if v.name.lower() in duplicate_locals_names:
var_map[v] = v.clone(name=f'{member.name}_{v.name}')
member.body = SubstituteExpressions(var_map).visit(member.body)

Expand Down

0 comments on commit 05956e8

Please sign in to comment.