From 5fc8bb9169865f21fa521a7fd10473586de4b767 Mon Sep 17 00:00:00 2001 From: Valentin Gatien-Baron Date: Tue, 19 Jul 2011 11:44:34 +0200 Subject: [PATCH] [fix] qmlAstCons: not generating source names when where are potentially after renaming it appears to somehow raise assertions later when you had db default values in several (non-linking) packages --- libqmlcompil/qmlAstCons.ml | 4 ++-- opa/pass_Typing.ml | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libqmlcompil/qmlAstCons.ml b/libqmlcompil/qmlAstCons.ml index 3cb26b86..d0cacd5a 100644 --- a/libqmlcompil/qmlAstCons.ml +++ b/libqmlcompil/qmlAstCons.ml @@ -356,14 +356,14 @@ struct let make_code_elt expr = let label = Annot.nolabel "QmlAstCons.make_code_elt" in - Q.NewVal (label, [(Ident.source "_", expr)]), + Q.NewVal (label, [(Ident.next "_", expr)]), (function | Q.NewVal (_, [(_, e)]) -> e | _ -> failwith "QmlAstCons.UnValRec.make_code_elt.rebuilder") let make_code_elt_maped expr = let label = Annot.nolabel "QmlAstCons.make_code_elt_maped" in - Q.NewVal (label, [(Ident.source "_", expr)]), + Q.NewVal (label, [(Ident.next "_", expr)]), (function | Q.M_NewVal [(_, t)] -> t | _ -> failwith "QmlAstCons.UnValRec.make_code_elt_maped.rebuilder") diff --git a/opa/pass_Typing.ml b/opa/pass_Typing.ml index aa4bfeda..1d6d20e2 100644 --- a/opa/pass_Typing.ml +++ b/opa/pass_Typing.ml @@ -23,7 +23,11 @@ module S = struct type t = (QmlAst.ty, unit) QmlGenericScheme.tsc IdentMap.t let pass = "pass_Typing" - let pp f _ = Format.pp_print_string f "" + let pp f map = + IdentMap.iter + (fun k v -> + Format.fprintf f "@[<2>%s ->@ %a@]@\n" (Ident.to_string k) QmlPrint.pp#tsc v + ) map end module R = ObjectFiles.Make(S)