From 3d022424ebd03ae328a4452b750bba67b3e86e0a Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Sat, 24 May 2025 06:53:21 +1000 Subject: [PATCH 1/2] Smallest change that fixes the problem --- lib/include/pl/patterns/pattern.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/include/pl/patterns/pattern.hpp b/lib/include/pl/patterns/pattern.hpp index 1a478f3f..fdb6cf89 100644 --- a/lib/include/pl/patterns/pattern.hpp +++ b/lib/include/pl/patterns/pattern.hpp @@ -699,7 +699,8 @@ namespace pl::ptrn { m_refPattern(other.m_refPattern) {} std::unique_ptr clone() const override { - return std::make_unique(*this); + //return std::make_unique(*this); + return std::make_unique(*m_refPattern); } void accept(PatternVisitor &v) override { From d3a5b02ac9514cf01f6ed1f13bc037c1d8dc9593 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Sat, 24 May 2025 06:55:17 +1000 Subject: [PATCH 2/2] Remove comment --- lib/include/pl/patterns/pattern.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/include/pl/patterns/pattern.hpp b/lib/include/pl/patterns/pattern.hpp index fdb6cf89..ffe6b109 100644 --- a/lib/include/pl/patterns/pattern.hpp +++ b/lib/include/pl/patterns/pattern.hpp @@ -699,7 +699,6 @@ namespace pl::ptrn { m_refPattern(other.m_refPattern) {} std::unique_ptr clone() const override { - //return std::make_unique(*this); return std::make_unique(*m_refPattern); }