Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix inheritance bug that doesn't reset state correctly
What? ===== This addresses a bug with a very specific set of criteria for reproduction: * a page object (A) inheriting from PageEz::Page with a macro declaring a block (nothing needs to be declared in the block) * a page object (B) inheriting from PageEz::Page that declares a top-level macro named (X) * a page object (C) inheriting from (A) that also declares a top-level macro named (X) The bug that triggered this failure (a duplicate element declaration error, which would be on (X) in the example above) was related to a state change (setting nested_macro to true) when a block is provided to a macro that wasn't reset after the block was complete. When a class inherits from PageEz or its subclasses, if it's not nested, it resets all its visitors. This key behavior wasn't being triggered on (C), resulting in it finding the same macro (X) from (B) and determining that it was a collision.
- Loading branch information