Browse files

[fix] pass_EnrichMagic: really discarding all its directive in --no-c…

…losure
  • Loading branch information...
1 parent b746c3d commit be30bda01de9452140ec436e49ef295243ae16be Valentin Gatien-Baron committed Jul 4, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 opa/pass_EnrichMagic.ml
View
12 opa/pass_EnrichMagic.ml
@@ -157,13 +157,13 @@ let process_code ~stdlib ~gamma ~annotmap code =
(specialize_env, annotmap, (List.rev toplvl))
let just_purge code =
- List.map
- (QmlAstWalk.Top.map_expr
- (function
- | Q.Directive (_, #Q.opavalue_directive, [expr], _) -> expr
+ QmlAstWalk.CodeExpr.map
+ (QmlAstWalk.Expr.self_traverse_map
+ (fun self tra -> function
+ | Q.Directive (_, #Q.opavalue_directive, [expr], _) -> self expr
| Q.Directive (_, #Q.opavalue_directive, _, _) as e ->
let context = QmlError.Context.expr e in
QmlError.serror context "Unexpected form for an opavalue directive.";
- e
- | e -> e)
+ tra e
+ | e -> tra e)
) code

0 comments on commit be30bda

Please sign in to comment.