From e6a7b18de4ff37e1c56bb4ee8d543c66f447aa10 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 19 Jan 2025 14:41:46 +0100 Subject: [PATCH] parser: Fixed parsing of anonymous placements inside of structs and unions --- lib/source/pl/core/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/source/pl/core/parser.cpp b/lib/source/pl/core/parser.cpp index f4d4ca76..b456085a 100644 --- a/lib/source/pl/core/parser.cpp +++ b/lib/source/pl/core/parser.cpp @@ -1645,7 +1645,7 @@ namespace pl::core { errorDesc("Cannot mark placed variable as 'const'.", "Variables placed in memory are always implicitly const."); } - auto variableName = getValue(-2).get(); + std::string variableName = memberIdentifier == nullptr ? "" : memberIdentifier->get(); if (memberIdentifier != nullptr) { if (m_currTemplateType.empty())