diff options
author | Björn Gustavsson <[email protected]> | 2010-11-22 12:23:46 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-11-22 12:23:46 +0100 |
commit | 8e18176bd4c02ffca4b0c5cba1f4b5425a588458 (patch) | |
tree | e969972a893975fb6d418da39a46a9141c7ff578 /lib/dialyzer/src/dialyzer_contracts.erl | |
parent | 29b572dbd1546796a0a94066548edfa3da6b4b9d (diff) | |
parent | 5c1dd79d08e8725b408d11b17ceb99e80ec7cddb (diff) | |
download | otp-8e18176bd4c02ffca4b0c5cba1f4b5425a588458.tar.gz otp-8e18176bd4c02ffca4b0c5cba1f4b5425a588458.tar.bz2 otp-8e18176bd4c02ffca4b0c5cba1f4b5425a588458.zip |
Merge branch 'ks/dialyzer-fixes' into dev
* ks/dialyzer-fixes:
dialyzer: Speed up analysis of nested list comprehensions
Diffstat (limited to 'lib/dialyzer/src/dialyzer_contracts.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_contracts.erl | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl index bf80c6f470..bcdcf2685d 100644 --- a/lib/dialyzer/src/dialyzer_contracts.erl +++ b/lib/dialyzer/src/dialyzer_contracts.erl @@ -163,20 +163,23 @@ process_contract_remote_types(CodeServer) -> check_contracts(Contracts, Callgraph, FunTypes) -> FoldFun = fun(Label, Type, NewContracts) -> - {ok, {M,F,A} = MFA} = dialyzer_callgraph:lookup_name(Label, Callgraph), - case orddict:find(MFA, Contracts) of - {ok, {_FileLine, Contract}} -> - case check_contract(Contract, Type) of - ok -> - case erl_bif_types:is_known(M, F, A) of - true -> - %% Disregard the contracts since - %% this is a known function. - NewContracts; - false -> - [{MFA, Contract}|NewContracts] + case dialyzer_callgraph:lookup_name(Label, Callgraph) of + {ok, {M,F,A} = MFA} -> + case orddict:find(MFA, Contracts) of + {ok, {_FileLine, Contract}} -> + case check_contract(Contract, Type) of + ok -> + case erl_bif_types:is_known(M, F, A) of + true -> + %% Disregard the contracts since + %% this is a known function. + NewContracts; + false -> + [{MFA, Contract}|NewContracts] + end; + {error, _Error} -> NewContracts end; - {error, _Error} -> NewContracts + error -> NewContracts end; error -> NewContracts end |