Merge branch 'release-5.x' into develop

This commit is contained in:
Jason Turner
2016-10-10 20:09:40 -06:00
2 changed files with 5 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ namespace chaiscript {
template<typename T>
auto optimize(const eval::AST_Node_Impl_Ptr<T> &p)
{
if (p->identifier == AST_Node_Type::Def
if ( (p->identifier == AST_Node_Type::Def || p->identifier == AST_Node_Type::Lambda)
&& !p->children.empty())
{
auto &last_child = p->children.back();