aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/contract3.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-10-14 11:15:07 +0200
committerFredrik Gustafsson <[email protected]>2013-10-14 11:15:07 +0200
commit4db36c5ac1ade665fdf3ddfc1c5782fdf40ef0dc (patch)
treee50f3b0f0d3b96a44bbaf93c90c6670d75438e2c /lib/dialyzer/test/small_SUITE_data/src/contract3.erl
parent240c5e4785fee63457e87c443eff5da82976c785 (diff)
parente978ff2a2c634ef2a4af7372cf2ecce8d70743b9 (diff)
downloadotp-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/contract3.erl')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/contract3.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/contract3.erl b/lib/dialyzer/test/small_SUITE_data/src/contract3.erl
index 5b0bee9694..a6ce91882e 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/contract3.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/contract3.erl
@@ -18,16 +18,23 @@ t(X, Y, Z) ->
(atom()|list()) -> atom().
t1(X) ->
- foo:bar(X).
+ f(X).
-spec t2(atom(), integer()) -> integer();
(atom(), list()) -> atom().
t2(X, Y) ->
- foo:bar(X, Y).
+ g(X, Y).
-spec t3(atom(), integer(), list()) -> integer();
(X, integer(), list()) -> X.
t3(X, Y, Z) ->
X.
+
+%% dummy functions below
+
+f(X) -> X.
+
+g(X, Y) when is_atom(X), is_integer(Y) -> Y;
+g(X, Y) when is_atom(X), is_list(Y) -> X.