1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 16:31:47 +02:00

Add ValueType checking functions for types that have the same NormalType

This commit is contained in:
Silvan Mosberger 2020-12-12 02:15:11 +01:00
parent 22ead43a0b
commit bf98903967
No known key found for this signature in database
GPG key ID: E8F1E9EAD284E17D
8 changed files with 40 additions and 26 deletions

View file

@ -73,7 +73,7 @@ static std::tuple<fetchers::Tree, FlakeRef, FlakeRef> fetchOrSubstituteTree(
static void forceTrivialValue(EvalState & state, Value & value, const Pos & pos)
{
if (value.type == tThunk && value.isTrivial())
if (value.isThunk() && value.isTrivial())
state.forceValue(value, pos);
}
@ -216,7 +216,7 @@ static Flake getFlake(
if (auto outputs = vInfo.attrs->get(sOutputs)) {
expectType(state, nFunction, *outputs->value, *outputs->pos);
if (outputs->value->type == tLambda && outputs->value->lambda.fun->matchAttrs) {
if (outputs->value->isLambda() && outputs->value->lambda.fun->matchAttrs) {
for (auto & formal : outputs->value->lambda.fun->formals->formals) {
if (formal.name != state.sSelf)
flake.inputs.emplace(formal.name, FlakeInput {