Permalink
Browse files

[fix] compiler, ei, rpc: If the explicit lambda doesn't takes any typ…

…e arguments don't the full_apply must be equals 0
  • Loading branch information...
BourgerieQuentin committed May 23, 2012
1 parent f79c8db commit b94c509203b5a269a69428db1b5ac755c8c91a4f
Showing with 6 additions and 1 deletion.
  1. +6 −1 opa/opa_InsertRemote.ml
View
@@ -643,7 +643,12 @@ let generate_skeleton explicit_map ~annotmap ~stdlib_gamma ~gamma ~side expr =
let args_ty = list_expr_ty @ list_expr_row @ list_expr_col in
match number_of_lambdas with
| `one_lambda ->
- full_apply gamma annotmap expr (args_ty @ list_expr_val) []
+ let args_ty, list_expr_val =
+ match args_ty with
+ | [] -> [], list_expr_val
+ | _ -> (args_ty @ list_expr_val), []
+ in
+ full_apply gamma annotmap expr args_ty list_expr_val
| `two_lambdas ->
let annotmap, apply1 = QmlAstCons.TypedExpr.apply gamma annotmap expr args_ty in
QmlAstCons.TypedExpr.apply gamma annotmap apply1 list_expr_val

0 comments on commit b94c509

Please sign in to comment.