Allow conversions while calling chaiscript funcs

* This puts ChaiScript funcs more on even footings with
   C++ defined funcs
 * Minor performance hit (0.5%)
This commit is contained in:
Jason Turner
2016-12-06 13:05:17 -07:00
parent 92c2ade1cd
commit cee57f998a
3 changed files with 110 additions and 25 deletions

View File

@@ -1226,7 +1226,7 @@ namespace chaiscript
if (dispatch::Param_Types(
std::vector<std::pair<std::string, Type_Info>>{Arg_List_AST_Node<T>::get_arg_type(catch_block->children[0], t_ss)}
).match(std::vector<Boxed_Value>{t_except}, t_ss.conversions()))
).match(std::vector<Boxed_Value>{t_except}, t_ss.conversions()).first)
{
t_ss.add_object(name, t_except);