Merge remote-tracking branch 'origin/topic/jsiwek/misc-lambda-fixes'

* origin/topic/jsiwek/misc-lambda-fixes:
  GH-725: fix logic for finding a lambda's usage of outer IDs
  Change record field anonymous functions to use lambda expressions
This commit is contained in:
Johanna Amann 2020-03-31 15:34:52 -07:00
commit 3ce1c9ffd6
12 changed files with 103 additions and 58 deletions

View file

@ -4311,6 +4311,11 @@ LambdaExpr::LambdaExpr(std::unique_ptr<function_ingredients> arg_ing,
id->SetConst();
}
Scope* LambdaExpr::GetScope() const
{
return ingredients->scope.get();
}
IntrusivePtr<Val> LambdaExpr::Eval(Frame* f) const
{
auto lamb = make_intrusive<BroFunc>(