From 86fc80f3b9c76d1a227ae138a35a07562f21f390 Mon Sep 17 00:00:00 2001 From: codereader Date: Sun, 26 Jun 2022 09:28:18 +0200 Subject: [PATCH] #5977: Declaration precedence is matching the engine's behaviour now, the first decl takes precedence --- radiantcore/decl/DeclarationManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radiantcore/decl/DeclarationManager.cpp b/radiantcore/decl/DeclarationManager.cpp index 8cf58090d5..03bfaf7fde 100644 --- a/radiantcore/decl/DeclarationManager.cpp +++ b/radiantcore/decl/DeclarationManager.cpp @@ -157,7 +157,8 @@ void DeclarationManager::reloadDecarations() { if (decl->getParseStamp() < _parseStamp) { - rMessage() << "Declaration no longer present after reloadDecls: " << name << std::endl; + rMessage() << "[DeclManager] " << getTypeName(decl->getDeclType()) << " " << + name << " no longer present after reloadDecls" << std::endl; auto syntax = decl->getBlockSyntax(); @@ -304,6 +305,9 @@ void DeclarationManager::createOrUpdateDeclaration(Type type, const DeclarationB { rWarning() << "[DeclParser]: " << getTypeName(type) << " " << existing->second->getDeclName() << " has already been declared" << std::endl; + + // Any declaration following after the first is ignored + return; } // Assign the block to the declaration instance