diff options
author | Hans Bolinder <[email protected]> | 2018-02-15 16:51:37 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-02-15 16:51:37 +0100 |
commit | 9e7b328be93eccaabaf22ff8081772031731026e (patch) | |
tree | 84ae3b36817b8c9905b37453679c3a0e7bfbfd1c /lib/dialyzer/test/small_SUITE_data | |
parent | 62176184ba0a68d4c2ef17283a9915fddf87ddff (diff) | |
parent | 9efdc2408ff33139878a58a58ab49402352a7a28 (diff) | |
download | otp-9e7b328be93eccaabaf22ff8081772031731026e.tar.gz otp-9e7b328be93eccaabaf22ff8081772031731026e.tar.bz2 otp-9e7b328be93eccaabaf22ff8081772031731026e.zip |
Merge branch 'maint'
* maint:
dialyzer: Fix a crash
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/record_match | 3 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/record_match.erl | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_match b/lib/dialyzer/test/small_SUITE_data/results/record_match new file mode 100644 index 0000000000..a0dd6f560a --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/results/record_match @@ -0,0 +1,3 @@ + +record_match.erl:16: Function select/0 has no local return +record_match.erl:17: Matching of pattern {'b_literal', 'undefined'} tagged with a record name violates the declared type of #b_local{} | #b_remote{} diff --git a/lib/dialyzer/test/small_SUITE_data/src/record_match.erl b/lib/dialyzer/test/small_SUITE_data/src/record_match.erl new file mode 100644 index 0000000000..8e9b91937f --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/record_match.erl @@ -0,0 +1,17 @@ +-module(record_match). + +-export([select/0]). + +-record(b_literal, {val}). +-record(b_remote, {mod,name,arity}). +-record(b_local, {name,arity}). + +-type b_remote() :: #b_remote{}. +-type b_local() :: #b_local{}. + +-type argument() :: b_remote() | b_local(). + +-record(b_set, {args=[] :: [argument()]}). + +select() -> + #b_set{args=[#b_remote{},#b_literal{}]}. |