aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-05-13 08:33:01 +0200
committerHans Bolinder <[email protected]>2014-05-13 08:33:01 +0200
commit1b0b2627bc16d75da311e4dd797356ff6c7f922d (patch)
treea25eeb693b17e40d85efcd46c30f94eb6bf61200 /lib/dialyzer
parent614bca0f5832f06bcc181c58b78e3371d79ec40d (diff)
parentbe579cbae4a9ab54ae0e56a8e729211c8e1db18f (diff)
downloadotp-1b0b2627bc16d75da311e4dd797356ff6c7f922d.tar.gz
otp-1b0b2627bc16d75da311e4dd797356ff6c7f922d.tar.bz2
otp-1b0b2627bc16d75da311e4dd797356ff6c7f922d.zip
Merge branch 'hb/hipe/field_with_remote/OTP-11918' into maint
* hb/hipe/field_with_remote/OTP-11918: hipe: fix a bug concerning typed record fields
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/src/dialyzer_contracts.erl9
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/remote_field.erl11
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl
index 283031eb9a..1d2dfc7b2d 100644
--- a/lib/dialyzer/src/dialyzer_contracts.erl
+++ b/lib/dialyzer/src/dialyzer_contracts.erl
@@ -752,14 +752,7 @@ is_remote_types_related(Contract, CSig, Sig, RecDict) ->
t_from_forms_without_remote([{FType, []}], RecDict) ->
Type0 = erl_types:t_from_form(FType, RecDict),
- Map =
- fun(Type) ->
- case erl_types:t_is_remote(Type) of
- true -> erl_types:t_none();
- false -> Type
- end
- end,
- {ok, erl_types:t_map(Map, Type0)};
+ {ok, erl_types:subst_all_remote(Type0, erl_types:t_none())};
t_from_forms_without_remote([{_FType, _Constrs}], _RecDict) ->
%% 'When' constraints
unsupported;
diff --git a/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl b/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl
new file mode 100644
index 0000000000..c34fa1b9dd
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl
@@ -0,0 +1,11 @@
+-module(remote_field).
+
+-type f(T) :: {ssl:sslsocket(), T}.
+
+-record(r1, { f1 :: f(_) }).
+-type r1(T) :: #r1{ f1 :: fun((ssl:sslsocket(), T) -> any()) }.
+
+-record(state, {
+ r :: r1(T),
+ arg :: T
+ }).