SemanticAnalysis.hpp: Re-add checking for redefinitions of constants

Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404-59 2025-01-01 04:21:20 +01:00
parent af9f76ee72
commit 2758a2e95a
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ private:
),
share_task(Function, Class),
share_task(Function, Define<true>),
make_nonlocal_task(Define<false>,
if (parsedTree.findReferenceByName<Define<true>>(parseComponent.name).has_value()) {
error(parseComponent.name + string(" cannot be redefined as it is final"), parseComponent.line);
}
)
};
};
};