Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] Missing position: OPA-697.

Fixes at least the exhibited case. However there are I think many other case
with the same error. At least, thsi shows the fixing principle.
  • Loading branch information...
commit 9d974e6fccfcf03fd55341edc9a2b55cc2941659 1 parent f0aca58
@fpessaux fpessaux authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 qmlpasses/pass_LambdaLifting.ml
View
12 qmlpasses/pass_LambdaLifting.ml
@@ -529,6 +529,9 @@ let absify ~toplevel env gamma_with_lambda_bindings annotmap e xs =
| _ ->
(* you don't add parameters to something that is not a function *)
assert false) annotmap e
+
+
+
let absify_untyped ~toplevel e xs =
match xs with
| [] when toplevel -> e
@@ -540,11 +543,18 @@ let absify_untyped ~toplevel e xs =
| Q.Coerce _
| Q.Directive (_, #ignored_directive, _, _) as e -> tra e
| _ -> assert false) e
+
+
+
let absify_fun_action e xs =
(* could use 0-ary functions, but since it's completely untested,
* seems risky for now *)
let xs = if xs = [] then [Ident.next "_"] else xs in
- QmlAstCons.UntypedExpr.lambda xs e
+ let pos = Q.Pos.expr e in
+ let label = Annot.next_label pos in
+ QmlAstCons.UntypedExprWithLabel.lambda ~label xs e
+
+
(* substitution on expressions *)
let subst e sigma =
Please sign in to comment.
Something went wrong with that request. Please try again.