Skip to content

Commit

Permalink
[fix] pass_ExplicitInstantiation: avoid inserting empty Newval
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Gatien-Baron authored and OpaOnWindowsNow committed Oct 10, 2011
1 parent fd1d3d6 commit caf4f1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qmlpasses/pass_ExplicitInstantiation.ml
Expand Up @@ -1439,7 +1439,11 @@ let process_code (have_typeof:QmlTypeVars.FreeVars.t) gamma annotmap _published
(QmlAstWalk.Top.fold_map_name_expr walk_top) (annotmap, []) qmlAst
in
let label = Annot.nolabel "Pass_ExplicitInstantiation.process_code" in
let qmlAst = qmlAst @ [QmlAst.NewVal (label, ajax_ast)] in
let qmlAst =
if ajax_ast = [] then
qmlAst
else
qmlAst @ [QmlAst.NewVal (label, ajax_ast)] in
let gamma_updt gamma (id, e) =
let tsc = QmlTypes.Scheme.quantify (QmlAnnotMap.find_ty (Q.QAnnot.expr e) annotmap) in
QmlTypes.Env.Ident.add id tsc gamma
Expand Down

0 comments on commit caf4f1e

Please sign in to comment.