libexpr: Soft-deprecate __overrides

Change-Id: I787e69e1dad6edc5ccdb747b74a9ccd6e8e13bb3
This commit is contained in:
piegames
2024-08-21 06:55:52 +00:00
parent ac6974777e
commit 7210ed1b87
20 changed files with 86 additions and 12 deletions
+6
View File
@@ -676,6 +676,12 @@ template<> struct BuildAST<grammar::expr::ancient_let> : change_head<BindingsSta
template<> struct BuildAST<grammar::expr::rec_set> : change_head<BindingsState> {
static void success(const auto & in, BindingsState & b, ExprState & s, State & ps) {
// Before inserting new attrs, check for __override and throw an error
// (the error will initially be a warning to ease migration)
if (!featureSettings.isEnabled(Dep::RecSetOverrides) && b.attrs.attrs.contains(ps.s.overrides)) {
ps.overridesFound(ps.at(in));
}
b.attrs.pos = ps.at(in);
b.attrs.recursive = true;
s.pushExpr<ExprAttrs>(b.attrs.pos, std::move(b.attrs));