aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2013-10-09 17:06:53 +0200
committerKostis Sagonas <[email protected]>2013-10-09 17:06:53 +0200
commit1e665762b7e3f5d6e8da2137130e842432f246b2 (patch)
tree12022988d350bc0e393039315ea220acd3e3d211
parentef0d395e38e9a009e2f9366acb77df999d69e832 (diff)
downloadotp-1e665762b7e3f5d6e8da2137130e842432f246b2.tar.gz
otp-1e665762b7e3f5d6e8da2137130e842432f246b2.tar.bz2
otp-1e665762b7e3f5d6e8da2137130e842432f246b2.zip
Use the modern version of is_subtype
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl b/lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl
index 0af4f7446f..074a93e2fe 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl
@@ -1,5 +1,5 @@
%%-----------------------------------------------------------------------------
-%% Test that tests overloaded contratcs.
+%% Test that tests overloaded contracts.
%% In December 2008 it works as far as intersection types are concerned (test1)
%% However, it does NOT work as far as type variables are concerned (test2)
%%-----------------------------------------------------------------------------
@@ -16,13 +16,13 @@ test2() ->
-type mod() :: atom().
--spec foo(ATM, list()) -> {'ok', ATM} | {'error', _} when is_subtype(ATM, mod())
- ; (MFA, list()) -> {'ok', MFA} | {'error', _} when is_subtype(MFA, mfa()).
+-spec foo(ATM, list()) -> {'ok', ATM} | {'error', _} when ATM :: mod()
+ ; (MFA, list()) -> {'ok', MFA} | {'error', _} when MFA :: mfa().
foo(F, _) when is_atom(F) ->
case atom_to_list(F) of
- [42|_] -> {ok, F};
- _Other -> {error, mod:bar(F)}
+ [42|_] -> {ok, F};
+ _Other -> {error, some_mod:some_function()}
end;
foo({M,F,A}, _) ->
case A =:= 0 of