1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 16:29:36 +01:00

Make the error cleaner when getFields is misused

This commit is contained in:
regnat 2021-06-10 08:56:20 +02:00
parent d51deeac1c
commit 71650c83c6

View file

@ -1308,7 +1308,7 @@ std::vector<Symbol> EvalState::getFields(Value & attrs, const Pos & pos)
return *attrNames;
}
forceValue(attrs);
forceAttrs(attrs);
std::vector<Symbol> res;
for (auto & attr : *attrs.attrs)
res.push_back(attr.name);