mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
safer interface for ExprLambda's formals
This commit is contained in:
parent
e43888890f
commit
34f780d747
12 changed files with 105 additions and 82 deletions
|
|
@ -771,7 +771,7 @@ TEST_F(PrimOpTest, derivation)
|
|||
ASSERT_EQ(v.type(), nFunction);
|
||||
ASSERT_TRUE(v.isLambda());
|
||||
ASSERT_NE(v.lambda().fun, nullptr);
|
||||
ASSERT_TRUE(v.lambda().fun->hasFormals);
|
||||
ASSERT_TRUE(v.lambda().fun->getFormals());
|
||||
}
|
||||
|
||||
TEST_F(PrimOpTest, currentTime)
|
||||
|
|
|
|||
|
|
@ -110,9 +110,8 @@ TEST_F(ValuePrintingTests, vLambda)
|
|||
PosTable::Origin origin = state.positions.addOrigin(std::monostate(), 1);
|
||||
auto posIdx = state.positions.add(origin, 0);
|
||||
auto body = ExprInt(0);
|
||||
auto formals = Formals{};
|
||||
|
||||
ExprLambda eLambda(state.mem.exprs.alloc, posIdx, createSymbol("a"), formals, &body);
|
||||
ExprLambda eLambda(state.mem.exprs.alloc, posIdx, createSymbol("a"), &body);
|
||||
|
||||
Value vLambda;
|
||||
vLambda.mkLambda(&env, &eLambda);
|
||||
|
|
@ -500,9 +499,8 @@ TEST_F(ValuePrintingTests, ansiColorsLambda)
|
|||
PosTable::Origin origin = state.positions.addOrigin(std::monostate(), 1);
|
||||
auto posIdx = state.positions.add(origin, 0);
|
||||
auto body = ExprInt(0);
|
||||
auto formals = Formals{};
|
||||
|
||||
ExprLambda eLambda(state.mem.exprs.alloc, posIdx, createSymbol("a"), formals, &body);
|
||||
ExprLambda eLambda(state.mem.exprs.alloc, posIdx, createSymbol("a"), &body);
|
||||
|
||||
Value vLambda;
|
||||
vLambda.mkLambda(&env, &eLambda);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue