diff options
author | Fredrik Gustafsson <[email protected]> | 2013-10-14 11:15:07 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-10-14 11:15:07 +0200 |
commit | 4db36c5ac1ade665fdf3ddfc1c5782fdf40ef0dc (patch) | |
tree | e50f3b0f0d3b96a44bbaf93c90c6670d75438e2c /lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl | |
parent | 240c5e4785fee63457e87c443eff5da82976c785 (diff) | |
parent | e978ff2a2c634ef2a4af7372cf2ecce8d70743b9 (diff) | |
download | otp-4db36c5ac1ade665fdf3ddfc1c5782fdf40ef0dc.tar.gz otp-4db36c5ac1ade665fdf3ddfc1c5782fdf40ef0dc.tar.bz2 otp-4db36c5ac1ade665fdf3ddfc1c5782fdf40ef0dc.zip |
Merge branch 'kostis/dialyzer_R16B02_fixes/OTP-11374' into maint
* kostis/dialyzer_R16B02_fixes/OTP-11374:
Fix crash when using remote types in the tail of list types
Adopt a convention about unknown modules
No reason for calls to unknown modules
Use the modern version of is_subtype
Adopt a convention about unknown modules
Fix a comment
Add some more comments about what the test does
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/overloaded1.erl | 10 |
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 |