From 05956e8496904aa7f7e1c566cd773811f9063c3f Mon Sep 17 00:00:00 2001 From: rolfhm <90390629+rolfhm@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:33:07 +0200 Subject: [PATCH] Use name.lower to avoid case errors Co-authored-by: Balthasar Reuter <6384870+reuterbal@users.noreply.github.com> --- loki/transform/transform_inline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loki/transform/transform_inline.py b/loki/transform/transform_inline.py index f12dc7613..3f09e6ed0 100644 --- a/loki/transform/transform_inline.py +++ b/loki/transform/transform_inline.py @@ -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)