diff options
author | Stavros Aronis <[email protected]> | 2012-02-19 22:05:59 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-05-21 15:31:18 +0200 |
commit | 4f613cdd3f570864768a577ba6e62079bc3fdfe2 (patch) | |
tree | 639b30ef86565940fb6b2e041aa8c8708bc099f1 /lib | |
parent | b8ab5bc3211fdee28000e2fd35a47dafa2a4316c (diff) | |
download | otp-4f613cdd3f570864768a577ba6e62079bc3fdfe2.tar.gz otp-4f613cdd3f570864768a577ba6e62079bc3fdfe2.tar.bz2 otp-4f613cdd3f570864768a577ba6e62079bc3fdfe2.zip |
Fix typer crashes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/typer/src/typer.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl index 6392f5765f..20911aaf8c 100644 --- a/lib/typer/src/typer.erl +++ b/lib/typer/src/typer.erl @@ -181,7 +181,6 @@ get_type_info(#analysis{callgraph = CallGraph, remove_external(CallGraph, PLT) -> {StrippedCG0, Ext} = dialyzer_callgraph:remove_external(CallGraph), - StrippedCG = dialyzer_callgraph:finalize(StrippedCG0), case get_external(Ext, PLT) of [] -> ok; Externals -> @@ -192,7 +191,7 @@ remove_external(CallGraph, PLT) -> _ -> msg(io_lib:format(" Unknown types: ~p\n", [ExtTypes])) end end, - StrippedCG. + StrippedCG0. -spec get_external([{mfa(), mfa()}], plt()) -> [mfa()]. @@ -902,7 +901,8 @@ analyze_core_tree(Core, Records, SpecInfo, CbInfo, ExpTypes, Analysis, File) -> CS6 = dialyzer_codeserver:insert_temp_exported_types(MergedExpTypes, CS5), Ex_Funcs = [{0,F,A} || {_,_,{F,A}} <- cerl:module_exports(Tree)], TmpCG = Analysis#analysis.callgraph, - CG = dialyzer_callgraph:scan_core_tree(Tree, TmpCG), + {V, E} = dialyzer_callgraph:scan_core_tree(Tree, TmpCG), + CG = dialyzer_callgraph:add_edges(E, V, TmpCG), Fun = fun analyze_one_function/2, All_Defs = cerl:module_defs(Tree), Acc = lists:foldl(Fun, #tmpAcc{file = File, module = Module}, All_Defs), |