aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src
diff options
context:
space:
mode:
authorGustav Simonsson <[email protected]>2012-03-15 11:35:20 +0100
committerGustav Simonsson <[email protected]>2012-03-15 11:35:20 +0100
commitd789eb25f5e426c5eeeac738ec687e61fe5984ac (patch)
treed6779a22a3b0d491622e389d848d34919c501cb5 /lib/dialyzer/test/small_SUITE_data/src
parent5770544e06548e5aec265eaca487429bcf332b42 (diff)
parentdb9c249a0dd1c948f9bcbc47df166c13e7856357 (diff)
downloadotp-d789eb25f5e426c5eeeac738ec687e61fe5984ac.tar.gz
otp-d789eb25f5e426c5eeeac738ec687e61fe5984ac.tar.bz2
otp-d789eb25f5e426c5eeeac738ec687e61fe5984ac.zip
Merge branch 'maint'
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl12
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/on_load.erl11
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl b/lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl
new file mode 100644
index 0000000000..4e1a0b015a
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/no_local_return.erl
@@ -0,0 +1,12 @@
+-module(no_local_return).
+
+%% NOTE: No function is exported. Dialyzer produced a bogus
+%% 'Function foo/0 has no local return' warning
+%% when in fact typer was finding correct return values for both
+%% these functions.
+
+foo() ->
+ bar(42).
+
+bar(X) ->
+ lists:duplicate(X, gazonk).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/on_load.erl b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
new file mode 100644
index 0000000000..16533a9caa
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
@@ -0,0 +1,11 @@
+%%% This is to ensure that "on_load" functions are never reported as unused.
+
+-module(on_load).
+
+-export([foo/0]).
+
+-on_load(bar/0).
+
+foo() -> ok.
+
+bar() -> ok.