aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-26 08:31:27 +0100
committerHans Bolinder <[email protected]>2014-03-26 08:31:27 +0100
commit4057cf67d8f4c42992efc61790225d394a8709a2 (patch)
tree72a445178e8ff1be3a32daa3cd46b67993f42a3b /lib/dialyzer/test/small_SUITE_data
parentd54ef284388e4e5148be8de51ba2f9ebc2e3285e (diff)
parenta360c3e6cdcc54fe040a1aef157eb1489ab4bdb3 (diff)
downloadotp-4057cf67d8f4c42992efc61790225d394a8709a2.tar.gz
otp-4057cf67d8f4c42992efc61790225d394a8709a2.tar.bz2
otp-4057cf67d8f4c42992efc61790225d394a8709a2.zip
Merge branch 'aronisstav/hipe/opaque_fix'
* aronisstav/hipe/opaque_fix: Don't 'opaque-decorate' a success typing using an incompatible spec
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/invalid_spec_22
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl5
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl8
3 files changed, 15 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2 b/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2
new file mode 100644
index 0000000000..4565112ea0
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2
@@ -0,0 +1,2 @@
+
+scala_user.erl:5: Invalid type specification for function scala_user:is_list/2. The success typing is (maybe_improper_list() | tuple(),_) -> boolean()
diff --git a/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl
new file mode 100644
index 0000000000..c26787fe24
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl
@@ -0,0 +1,5 @@
+-module(scala_data).
+
+-export_type([data/0]).
+
+-opaque data() :: {'data', term()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl
new file mode 100644
index 0000000000..4e981f3b74
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl
@@ -0,0 +1,8 @@
+-module(scala_user).
+
+-export([is_list/2]).
+
+-spec is_list(atom(), scala_data:data()) -> boolean().
+
+is_list( List,Data) when is_list(List) -> true;
+is_list(Tuple,Data) when is_tuple(Tuple) -> false.