diff options
author | Magnus Lång <[email protected]> | 2016-06-28 11:23:49 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-06-28 13:36:11 +0200 |
commit | a296fc4d7f6f52c78da4596b9b08f39147089d44 (patch) | |
tree | da8292afe0cbdb1a9f980c0a69e52d742a99df9c /lib/dialyzer/test | |
parent | 3b7a6ffddc819bf305353a593904cea9e932e7dc (diff) | |
download | otp-a296fc4d7f6f52c78da4596b9b08f39147089d44.tar.gz otp-a296fc4d7f6f52c78da4596b9b08f39147089d44.tar.bz2 otp-a296fc4d7f6f52c78da4596b9b08f39147089d44.zip |
erl_types: Normalise X:=none() pairs in t_map/3
t_map/3 previously required callers to perform this normalisation, but
as t_from_form/5 would sometimes fail to do so, this requirement is
relaxed.
Bug (ERL-177) reported and shrunk by Luke Imhoff.
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r-- | lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl | 9 | ||||
-rw-r--r-- | lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl new file mode 100644 index 0000000000..827984b20b --- /dev/null +++ b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl @@ -0,0 +1,9 @@ +-module(a). +-export([to_map/1, to_map/2]). +-type t() :: #{type := b:t()}. + +-spec to_map(t()) -> map(). +to_map(Resource) -> to_map(Resource, #{}). + +-spec to_map(t(), map()) -> map(). +to_map(_, Map) when is_map(Map) -> #{}. diff --git a/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl new file mode 100644 index 0000000000..31f9bb6b3e --- /dev/null +++ b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl @@ -0,0 +1,3 @@ +-module(b). +-export_type([t/0]). +-type t() :: binary(). |