Custom rules share local variable scope when nested

1 sentence description of the problem: If you have two custom rules inside of a third custom rule, local variables with the same name in each of the inner rules will be identical. This is not correct and is not what happens when the custom rules are in the top level.

Steps to reproduce the problem every time:
(Start in a blank draft if possible)

  1. Create a new object and in it create a custom rule
  2. In the outer custom rule, create a second custom rule. Add a local variable to it outside of any magenta blocks
  3. Add some way to display the value of the local variable
  4. In the outer custom rule, create another custom rule. Make have a local variable with the same name but a different value

I expected this to happen:
Each custom rule would have its own scope

But instead this happened:
They shared the local variables

https://c.gethopscotch.com/p/13kr61mltc

8 Likes

This is still an issue

3 Likes