1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 13:51:16 +02:00

libexpr: Add and use app getter

This commit is contained in:
Sergei Zimmerman 2025-06-12 19:53:44 +00:00
parent f07a9f863e
commit c041d71406
No known key found for this signature in database
GPG key ID: A9B0B557CA632325
3 changed files with 5 additions and 2 deletions

View file

@ -148,7 +148,7 @@ PosIdx Value::determinePos(const PosIdx pos) const
switch (internalType) {
case tAttrs: return attrs()->pos;
case tLambda: return lambda().fun->pos;
case tApp: return payload.app.left->determinePos(pos);
case tApp: return app().left->determinePos(pos);
default: return pos;
}
#pragma GCC diagnostic pop

View file

@ -106,7 +106,7 @@ void EvalState::forceValue(Value & v, const PosIdx pos)
}
}
else if (v.isApp())
callFunction(*v.payload.app.left, *v.payload.app.right, v, pos);
callFunction(*v.app().left, *v.app().right, v, pos);
}

View file

@ -491,6 +491,9 @@ public:
FunctionApplicationThunk primOpApp() const
{ return payload.primOpApp; }
FunctionApplicationThunk app() const
{ return payload.app; }
};