aboutsummaryrefslogtreecommitdiffstats
path: root/lib/typer
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2011-02-08 13:14:31 +0200
committerKostis Sagonas <[email protected]>2011-02-08 13:14:31 +0200
commitd8aca1e414c1c39be7fe8292762fbd6a370b37c6 (patch)
tree8e5e8665fc1963e316a4a1f565227ac90b409654 /lib/typer
parent28af8292387864f1d8467ddd6d8d6bb343e6851b (diff)
downloadotp-d8aca1e414c1c39be7fe8292762fbd6a370b37c6.tar.gz
otp-d8aca1e414c1c39be7fe8292762fbd6a370b37c6.tar.bz2
otp-d8aca1e414c1c39be7fe8292762fbd6a370b37c6.zip
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.
Diffstat (limited to 'lib/typer')
-rw-r--r--lib/typer/src/typer.erl2
1 files changed, 2 insertions, 0 deletions
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),