From d8aca1e414c1c39be7fe8292762fbd6a370b37c6 Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Tue, 8 Feb 2011 13:14:31 +0200 Subject: Fix crash in oveloaded contracts with overlapping domains Typer should not crash miserably when processing a user-specified overloaded contract with overlapping types in its arguments. --- lib/typer/src/typer.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/typer/src/typer.erl') diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl index 0e91e795af..05cc873c2c 100644 --- a/lib/typer/src/typer.erl +++ b/lib/typer/src/typer.erl @@ -399,6 +399,8 @@ get_type({{M, F, A} = MFA, Range, Arg}, CodeServer, Records) -> ok -> {{F, A}, {contract, Contract}}; {error, {extra_range, _, _}} -> {{F, A}, {contract, Contract}}; + {error, {overlapping_contract, []}} -> + {{F, A}, {contract, Contract}}; {error, invalid_contract} -> CString = dialyzer_contracts:contract_to_string(Contract), SigString = dialyzer_utils:format_sig(Sig, Records), -- cgit v1.2.3