Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] compiler, passes: Check recursive values should traverse all bi…

…ndings directive
  • Loading branch information...
commit f6cb10d7944ed0a55e35c28d8e1d829afe7c9196 1 parent 2399a17
@BourgerieQuentin BourgerieQuentin authored
View
8 libqmlcompil/qmlAst.ml
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -1072,6 +1072,12 @@ type qml_directive = [
*)
]
+type binding_directive = [
+| slicer_directive
+| `async
+| opavalue_directive
+]
+
(* TODO: remove Coerce form AST and use this instead; same for Parser; maybe others ? *)
and expr =
View
4 qmlpasses/pass_CompileRecursiveValues.ml
@@ -99,7 +99,7 @@ let is_a_val_binding idents (_i, e) =
| Q.Coerce (_, e, _)
(* BEWARE before editing: keep this set of directive in sync with the one
* in remove_toplevel_directives *)
- | Q.Directive (_, (#Q.type_directive | #Q.slicer_directive | `async), [e], _) -> is_a_val e
+ | Q.Directive (_, (#Q.type_directive | #Q.binding_directive), [e], _) -> is_a_val e
| _ -> raise InvalidRecursion in
is_a_val e
@@ -192,7 +192,7 @@ let remove_toplevel_directives annotmap e =
| Q.Directive (label, #Q.type_directive, [e], _) ->
let annotmap = move_ei_tsc_gen label annotmap e in
aux dirs annotmap e
- | Q.Directive (label, (#Q.slicer_directive | `async as v), [e], []) ->
+ | Q.Directive (label, (#Q.binding_directive as v), [e], []) ->
let annotmap = move_ei_tsc_gen label annotmap e in
aux (v :: dirs) annotmap e
| Q.Directive (_, #Q.slicer_directive, _, _) -> assert false
Please sign in to comment.
Something went wrong with that request. Please try again.