Skip to content
Browse files

[fix] pass_ExplicitInstantiation: avoid inserting empty Newval

  • Loading branch information...
1 parent 7bace86 commit 00d9d8a8092443067743baee32d2a9d74497b663 Valentin Gatien-Baron committed with François-Régis Sinot Aug 12, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 qmlpasses/pass_ExplicitInstantiation.ml
View
6 qmlpasses/pass_ExplicitInstantiation.ml
@@ -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

0 comments on commit 00d9d8a

Please sign in to comment.
Something went wrong with that request. Please try again.